/* CallaOne Modern Dashboard Styles */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-dark: #0f172a;
    --bg-panel: #1e293b;
    --text-white: #f8fafc;
    --text-gray: #94a3b8;
    --status-online: #22c55e;
    --status-busy: #f59e0b;
    --status-offline: #64748b;
    --danger: #ef4444;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-white);
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

.dashboard-container {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    height: 100vh;
}

/* Sidebar (User List) */
.sidebar {
    background-color: var(--bg-panel);
    border-right: 1px solid #334155;
    padding: 20px;
    overflow-y: auto;
}

.user-card {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background-color: #334155;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.user-card:hover {
    background-color: #475569;
}

.user-card.active {
    border: 1px solid var(--primary-color);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #475569;
    margin-right: 12px;
    position: relative;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--status-offline);
    position: absolute;
    bottom: 0;
    right: 0;
    border: 2px solid var(--bg-panel);
}

.status-online .status-dot {
    background-color: var(--status-online);
}

.status-busy .status-dot {
    background-color: var(--status-busy);
}

.status-offline .status-dot {
    background-color: var(--status-offline);
}

.user-info h4 {
    margin: 0;
    font-size: 14px;
    color: var(--text-white);
}

.user-info span {
    font-size: 12px;
    color: var(--text-gray);
}


/* Main Call Area */
.main-area {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
}

.call-ui {
    text-align: center;
    padding: 40px;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid #334155;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: none;
    /* Hidden by default until call starts */
    animation: fadeIn 0.3s ease-in-out;
}

.call-ui.active {
    display: block;
}

.call-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
    overflow: hidden;
}

.call-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.call-status {
    font-size: 18px;
    color: var(--text-gray);
    margin-bottom: 30px;
}

.call-controls {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 24px;
}

.btn-accept {
    background-color: var(--status-online);
    color: white;
}

.btn-reject {
    background-color: var(--danger);
    color: white;
}

.btn-hangup {
    background-color: var(--danger);
    color: white;
}

.btn-mute {
    background-color: #475569;
    color: white;
}

.btn-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

/* Chat Panel */
.chat-panel {
    background-color: var(--bg-panel);
    border-left: 1px solid #334155;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 15px;
    border-bottom: 1px solid #334155;
    font-weight: bold;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.msg-sent {
    align-self: flex-end;
    background-color: var(--primary-color);
    color: white;
    border-bottom-right-radius: 2px;
}

.msg-received {
    align-self: flex-start;
    background-color: #334155;
    color: var(--text-white);
    border-bottom-left-radius: 2px;
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid #334155;
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    background-color: #0f172a;
    border: 1px solid #334155;
    border-radius: 20px;
    padding: 10px 15px;
    color: white;
    outline: none;
}

.btn-send {
    background-color: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animations for Calls */
@keyframes ring {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.incoming-ring {
    animation: ring 2s infinite;
}

/* Reset Button (Hidden usually) */
.reset-btn {
    position: fixed;
    bottom: 10px;
    left: 10px;
    opacity: 0.1;
    transition: opacity 0.3s;
}

.reset-btn:hover {
    opacity: 1;
}