/* ============================================
   ChatApp - WhatsApp Clone Styles
   Exact match to WhatsApp Web UI
   ============================================ */

/* CSS Variables - WhatsApp Color Palette */
:root {
    --wa-green: #00a884;
    --wa-green-dark: #008069;
    --wa-green-light: #25d366;
    --wa-teal: #075e54;
    --wa-teal-dark: #054d44;
    --wa-blue-check: #53bdeb;
    --wa-bg: #efeae2;
    --wa-bg-pattern: #d1d7db;
    --wa-panel-bg: #ffffff;
    --wa-panel-header: #f0f2f5;
    --wa-hover: #f5f6f6;
    --wa-active: #f0f2f5;
    --wa-border: #e9edef;
    --wa-text-primary: #111b21;
    --wa-text-secondary: #667781;
    --wa-text-light: #8696a0;
    --wa-input-bg: #f0f2f5;
    --wa-input-active: #ffffff;
    --wa-bubble-out: #d9fdd3;
    --wa-bubble-in: #ffffff;
    --wa-bubble-system: #ffecd2;
    --wa-unread-badge: #25d366;
    --wa-dropdown-bg: #ffffff;
    --wa-dropdown-shadow: rgba(11, 20, 26, 0.13);
    --wa-overlay: rgba(11, 20, 26, 0.4);
    --wa-icon: #54656f;
    --wa-icon-lighter: #8696a0;
    --wa-search-bg: #f0f2f5;
    --wa-chat-bg: #efeae2;
    --wa-chat-pattern: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwQAADsEBuJFr7QAAAAd0SU1FB+QMFhQoN3ZzfIgAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAaklEQVRo3u3aMQ0AIAwAQPqvwQ0YwIUzWQV0trv72OPn9wMA/6upDgCAO0YSYCQBRhJgJAFGEmAkAUYSYCQBRhJgJAFGEmAkAUYSYCQBRhJgJAFGEmAkAUYSYCQBRhJgJAFGEmAkAUYScAACNAMJ6qP79QAAAABJRU5ErkJggg==");
    --sidebar-width: 440px;
    --header-height: 59px;
    --input-height: 62px;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Segoe UI', Helvetica Neue, Helvetica, Lucida Grande, Arial, Ubuntu, Cantarell, Fira Sans, sans-serif;
    font-size: 14.2px;
    color: var(--wa-text-primary);
    background: #222e35;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.2);
    border-radius: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}

/* ============================================
   APP CONTAINER
   ============================================ */
.app-container {
    display: flex;
    height: 100vh;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

/* Top green bar */
.app-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 127px;
    background: var(--wa-teal);
    z-index: 0;
}

.app-container::after {
    content: '';
    position: fixed;
    top: 127px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #d1d7db;
    z-index: 0;
}

/* ============================================
   LEFT PANEL - Chat List
   ============================================ */
.left-panel {
    width: var(--sidebar-width);
    min-width: 340px;
    max-width: 520px;
    height: 100vh;
    background: var(--wa-panel-bg);
    border-right: 1px solid var(--wa-border);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

/* Panel Header */
.panel-header {
    height: var(--header-height);
    background: var(--wa-panel-header);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    position: relative;
}

/* Avatar */
.avatar-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
}

.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: #dfe5e7 url('../img/default-avatar.svg') center/cover no-repeat;
}

/* Icon Button */
.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--wa-icon);
    transition: background 0.15s;
    flex-shrink: 0;
}

.icon-btn:hover {
    background: rgba(0,0,0,.05);
}

.icon-btn svg {
    fill: var(--wa-icon);
}

.icon-btn i {
    font-size: 18px;
    color: var(--wa-icon);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 48px;
    right: 0;
    background: var(--wa-dropdown-bg);
    border-radius: 3px;
    box-shadow: 0 2px 5px 0 var(--wa-dropdown-shadow);
    min-width: 200px;
    z-index: 100;
    display: none;
    padding: 10px 0;
    animation: dropdownSlide 0.15s ease;
}

.dropdown-menu.show {
    display: block;
}

@keyframes dropdownSlide {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.dropdown-menu ul {
    list-style: none;
}

.dropdown-menu li {
    padding: 9px 58px 9px 24px;
    cursor: pointer;
    font-size: 14.5px;
    color: var(--wa-text-primary);
    transition: background 0.15s;
    white-space: nowrap;
}

.dropdown-menu li:hover {
    background: var(--wa-hover);
}

/* Search Container */
.search-container {
    display: flex;
    align-items: center;
    padding: 7px 10px;
    background: var(--wa-panel-bg);
    flex-shrink: 0;
}

.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--wa-search-bg);
    border-radius: 8px;
    padding: 0 8px 0 12px;
    height: 35px;
    transition: background 0.15s;
}

.search-box:focus-within {
    background: var(--wa-input-active);
    box-shadow: 0 0 0 1px var(--wa-border);
}

.search-box svg {
    flex-shrink: 0;
    fill: var(--wa-icon-lighter);
    margin-right: 12px;
    width: 18px;
    height: 18px;
}

.search-box .icon-btn {
    width: 30px;
    height: 30px;
    margin-right: 4px;
}

.search-box input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 13px;
    color: var(--wa-text-primary);
    height: 100%;
}

.search-box input::placeholder {
    color: var(--wa-text-light);
}

.filter-btn {
    margin-left: 6px;
}

/* Chat List */
.chat-list {
    flex: 1;
    overflow-y: auto;
    background: var(--wa-panel-bg);
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 0 15px;
    height: 72px;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
}

.chat-item:hover {
    background: var(--wa-hover);
}

.chat-item.active {
    background: var(--wa-active);
}

.chat-item .avatar-wrapper {
    width: 49px;
    height: 49px;
    margin-right: 15px;
}

.chat-item-content {
    flex: 1;
    border-bottom: 1px solid var(--wa-border);
    padding: 13px 0;
    display: flex;
    min-width: 0;
    height: 100%;
}

.chat-item-info {
    flex: 1;
    min-width: 0;
}

.chat-item-info h3 {
    font-size: 17px;
    font-weight: 400;
    color: var(--wa-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.chat-item-info p {
    font-size: 13px;
    color: var(--wa-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 3px;
}

.chat-item-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 13px 0;
    margin-left: 6px;
    flex-shrink: 0;
}

.chat-time {
    font-size: 12px;
    color: var(--wa-text-light);
    margin-bottom: 4px;
    white-space: nowrap;
}

.chat-time.unread {
    color: var(--wa-unread-badge);
}

.unread-badge {
    background: var(--wa-unread-badge);
    color: white;
    font-size: 11px;
    font-weight: 500;
    min-width: 20px;
    height: 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

.pin-icon {
    color: var(--wa-text-light);
    font-size: 14px;
    transform: rotate(45deg);
}

.muted-icon {
    color: var(--wa-text-light);
    font-size: 12px;
}

/* Message tick icons in chat list */
.msg-tick {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.msg-tick svg {
    width: 18px;
    height: 18px;
}

.msg-tick.sent svg { fill: var(--wa-text-light); }
.msg-tick.delivered svg { fill: var(--wa-text-light); }
.msg-tick.read svg { fill: var(--wa-blue-check); }

.typing-indicator {
    color: var(--wa-green);
    font-style: italic;
}

/* ============================================
   RIGHT PANEL - Chat View
   ============================================ */
.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    min-width: 0;
}

/* Default State */
.default-state {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wa-panel-header);
    border-bottom: 6px solid var(--wa-green);
}

.default-content {
    text-align: center;
    color: var(--wa-text-secondary);
    max-width: 560px;
    padding: 40px;
}

.default-content .intro-img {
    width: 320px;
    margin-bottom: 28px;
}

.default-content h1 {
    font-size: 32px;
    font-weight: 300;
    color: var(--wa-text-primary);
    margin-bottom: 18px;
}

.default-content p {
    font-size: 14px;
    color: var(--wa-text-secondary);
    margin-bottom: 10px;
    line-height: 20px;
}

.encryption-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 36px;
    font-size: 13px;
    color: var(--wa-text-light);
}

/* Chat View */
.chat-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--wa-panel-bg);
}

/* Chat Header */
.chat-header {
    height: var(--header-height);
    background: var(--wa-panel-header);
    display: flex;
    align-items: center;
    padding: 0 16px;
    flex-shrink: 0;
}

.chat-contact-info {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    cursor: pointer;
    padding: 0 12px 0 0;
}

.chat-contact-info .avatar-wrapper {
    width: 40px;
    height: 40px;
    margin-right: 15px;
}

.contact-details {
    flex: 1;
    min-width: 0;
}

.contact-details h3 {
    font-size: 16px;
    font-weight: 400;
    color: var(--wa-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-details .status-text {
    font-size: 13px;
    color: var(--wa-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    position: relative;
}

/* Messages Container */
.messages-container {
    flex: 1;
    overflow-y: auto;
    background: var(--wa-chat-bg);
    background-image: var(--wa-chat-pattern);
    position: relative;
}

.messages-wrapper {
    padding: 20px 60px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

/* Date Separator */
.date-separator {
    display: flex;
    justify-content: center;
    margin: 12px 0;
}

.date-separator span {
    background: var(--wa-bubble-system);
    color: var(--wa-text-primary);
    font-size: 12.5px;
    padding: 6px 12px;
    border-radius: 8px;
    box-shadow: 0 1px 0.5px rgba(11,20,26,.13);
    opacity: .9;
}

/* Message Bubbles */
.message {
    display: flex;
    margin-bottom: 2px;
    max-width: 65%;
    position: relative;
    animation: messageIn 0.15s ease;
}

@keyframes messageIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.outgoing {
    align-self: flex-end;
}

.message.incoming {
    align-self: flex-start;
}

.message-bubble {
    padding: 6px 7px 8px 9px;
    border-radius: 7.5px;
    position: relative;
    box-shadow: 0 1px 0.5px rgba(11,20,26,.13);
    word-wrap: break-word;
    word-break: break-word;
}

.message.outgoing .message-bubble {
    background: var(--wa-bubble-out);
    border-top-right-radius: 0;
}

.message.incoming .message-bubble {
    background: var(--wa-bubble-in);
    border-top-left-radius: 0;
}

/* Message tail */
.message.outgoing .message-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    right: -8px;
    width: 8px;
    height: 13px;
    background: var(--wa-bubble-out);
    clip-path: polygon(0 0, 0% 100%, 100% 0);
}

.message.incoming .message-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: -8px;
    width: 8px;
    height: 13px;
    background: var(--wa-bubble-in);
    clip-path: polygon(100% 0, 0 0, 100% 100%);
}

.message.continued .message-bubble::before {
    display: none;
}

.message.continued.outgoing .message-bubble {
    border-top-right-radius: 7.5px;
}

.message.continued.incoming .message-bubble {
    border-top-left-radius: 7.5px;
}

/* Sender name in groups */
.message-sender {
    font-size: 12.8px;
    font-weight: 500;
    margin-bottom: 2px;
    padding-right: 40px;
}

.message-sender.color-1 { color: #e06c75; }
.message-sender.color-2 { color: #61afef; }
.message-sender.color-3 { color: #98c379; }
.message-sender.color-4 { color: #d19a66; }
.message-sender.color-5 { color: #c678dd; }
.message-sender.color-6 { color: #e5c07b; }

/* Reply preview in message */
.message-reply {
    background: rgba(0,0,0,.05);
    border-left: 4px solid var(--wa-green);
    border-radius: 7.5px;
    padding: 5px 12px 7px 12px;
    margin-bottom: 3px;
    cursor: pointer;
}

.message-reply-name {
    font-size: 12.8px;
    font-weight: 500;
    color: var(--wa-green-dark);
    margin-bottom: 1px;
}

.message-reply-text {
    font-size: 12.5px;
    color: var(--wa-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

/* Message content text */
.message-text {
    font-size: 14.2px;
    line-height: 19px;
    color: var(--wa-text-primary);
    white-space: pre-wrap;
}

.message-text a {
    color: var(--wa-blue-check);
    text-decoration: none;
}

.message-text a:hover {
    text-decoration: underline;
}

/* Forwarded label */
.forwarded-label {
    font-size: 12px;
    color: var(--wa-text-light);
    font-style: italic;
    margin-bottom: 1px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.forwarded-label i {
    font-size: 14px;
}

/* Message media */
.message-media {
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 3px;
    max-width: 330px;
    cursor: pointer;
}

.message-media img,
.message-media video {
    display: block;
    max-width: 100%;
    border-radius: 6px;
}

.message-document {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(0,0,0,.04);
    border-radius: 6px;
    margin-bottom: 3px;
    min-width: 240px;
}

.message-document .doc-icon {
    font-size: 30px;
    color: var(--wa-icon);
}

.message-document .doc-info {
    flex: 1;
    min-width: 0;
}

.message-document .doc-name {
    font-size: 13.5px;
    color: var(--wa-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-document .doc-size {
    font-size: 11px;
    color: var(--wa-text-secondary);
}

/* Message footer (time + ticks) */
.message-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    float: right;
    margin: -4px 0 -5px 12px;
    position: relative;
}

.message-time {
    font-size: 11px;
    color: var(--wa-text-light);
    white-space: nowrap;
}

.message-tick {
    display: inline-flex;
    align-items: center;
}

.message-tick svg {
    width: 16px;
    height: 16px;
}

.message-tick.sent svg { fill: var(--wa-text-light); }
.message-tick.delivered svg { fill: var(--wa-text-light); }
.message-tick.read svg { fill: var(--wa-blue-check); }

/* System message */
.message.system {
    align-self: center;
    max-width: none;
}

.message.system .message-bubble {
    background: var(--wa-bubble-system);
    text-align: center;
    padding: 5px 12px;
    border-radius: 7.5px;
    font-size: 12.5px;
    color: var(--wa-text-secondary);
    box-shadow: none;
}

.message.system .message-bubble::before {
    display: none;
}

/* Deleted message */
.message-deleted {
    font-style: italic;
    color: var(--wa-text-light) !important;
    display: flex;
    align-items: center;
    gap: 4px;
}

.message-deleted i {
    font-size: 16px;
}

/* Message hover actions */
.message-actions-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 26px;
    height: 26px;
    border: none;
    background: inherit;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.message:hover .message-actions-btn,
.message-actions-btn.active {
    display: flex;
}

.message-actions-btn svg {
    width: 18px;
    height: 18px;
    fill: var(--wa-icon-lighter);
}

.message.outgoing .message-actions-btn {
    background: var(--wa-bubble-out);
}

.message.incoming .message-actions-btn {
    background: var(--wa-bubble-in);
}

/* Reply Preview Bar */
.reply-preview {
    display: flex;
    align-items: center;
    padding: 5px 15px 5px 60px;
    background: var(--wa-panel-header);
    border-left: 4px solid transparent;
}

.reply-preview-content {
    flex: 1;
    display: flex;
    background: var(--wa-panel-bg);
    border-radius: 8px;
    overflow: hidden;
    padding: 8px 12px;
    border-left: 4px solid var(--wa-green);
}

.reply-info {
    flex: 1;
    min-width: 0;
}

.reply-name {
    display: block;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--wa-green-dark);
}

.reply-text {
    display: block;
    font-size: 13px;
    color: var(--wa-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reply-close {
    width: 28px;
    height: 28px;
    margin-left: 8px;
}

/* Message Input Area */
.message-input-area {
    display: flex;
    align-items: flex-end;
    padding: 5px 10px;
    background: var(--wa-panel-header);
    min-height: var(--input-height);
    flex-shrink: 0;
}

.emoji-btn-wrapper {
    display: flex;
    align-items: center;
}

.message-input-wrapper {
    flex: 1;
    margin: 5px 8px;
    background: var(--wa-input-active);
    border-radius: 8px;
    padding: 9px 12px;
    min-height: 20px;
    max-height: 160px;
    overflow-y: auto;
}

.message-input {
    outline: none;
    font-size: 15px;
    line-height: 20px;
    color: var(--wa-text-primary);
    min-height: 20px;
    max-height: 140px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.message-input:empty::before {
    content: attr(data-placeholder);
    color: var(--wa-text-light);
    pointer-events: none;
}

.send-btn svg {
    fill: var(--wa-icon);
}

/* Attach Menu */
.attach-menu {
    position: absolute;
    bottom: 60px;
    left: 48px;
    z-index: 100;
    animation: attachSlide 0.2s ease;
}

@keyframes attachSlide {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.attach-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.attach-option {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    padding: 4px 0;
}

.attach-icon {
    width: 53px;
    height: 53px;
    border-radius: 50%;
    background: var(--color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.attach-option span {
    color: var(--wa-panel-bg);
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0,0,0,.4);
}

/* Emoji Picker */
.emoji-picker {
    position: absolute;
    bottom: 62px;
    left: 0;
    width: var(--sidebar-width);
    height: 330px;
    background: var(--wa-panel-header);
    border-top: 1px solid var(--wa-border);
    z-index: 50;
    display: flex;
    flex-direction: column;
}

.emoji-search {
    padding: 8px 12px;
}

.emoji-search input {
    width: 100%;
    padding: 6px 12px;
    border: none;
    border-radius: 20px;
    background: var(--wa-input-bg);
    outline: none;
    font-size: 14px;
}

.emoji-grid {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    align-content: start;
}

.emoji-item {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.1s;
}

.emoji-item:hover {
    background: var(--wa-hover);
}

/* ============================================
   SIDE PANELS
   ============================================ */
.side-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100%;
    background: var(--wa-panel-bg);
    z-index: 10;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.25s ease;
}

.right-side-panel {
    left: auto;
    right: 0;
    width: 420px;
    border-left: 1px solid var(--wa-border);
    animation: slideInRight 0.25s ease;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.side-panel-header {
    height: 108px;
    background: var(--wa-teal);
    display: flex;
    align-items: flex-end;
    padding: 0 20px 18px 20px;
    gap: 24px;
    color: white;
    flex-shrink: 0;
}

.side-panel-header h2 {
    font-size: 19px;
    font-weight: 500;
}

.side-panel-header .icon-btn {
    color: white;
}

.side-panel-header .icon-btn svg,
.side-panel-header .icon-btn i {
    fill: white;
    color: white;
}

.green-header {
    background: var(--wa-teal);
}

/* New Chat Contacts */
.new-chat-options {
    padding: 0;
}

.new-chat-option {
    display: flex;
    align-items: center;
    padding: 13px 30px;
    cursor: pointer;
    gap: 20px;
    transition: background 0.15s;
}

.new-chat-option:hover {
    background: var(--wa-hover);
}

.option-icon {
    width: 49px;
    height: 49px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.new-chat-option span {
    font-size: 17px;
    color: var(--wa-text-primary);
}

.contacts-list {
    flex: 1;
    overflow-y: auto;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 0 30px;
    height: 72px;
    cursor: pointer;
    transition: background 0.15s;
}

.contact-item:hover {
    background: var(--wa-hover);
}

.contact-item .avatar-wrapper {
    width: 49px;
    height: 49px;
    margin-right: 15px;
}

.contact-item-info {
    flex: 1;
    border-bottom: 1px solid var(--wa-border);
    padding: 13px 0;
}

.contact-item-info h3 {
    font-size: 17px;
    font-weight: 400;
    color: var(--wa-text-primary);
    margin-bottom: 2px;
}

.contact-item-info p {
    font-size: 13px;
    color: var(--wa-text-secondary);
}

.contact-item .check-icon {
    color: var(--wa-green);
    font-size: 20px;
    display: none;
}

.contact-item.selected .check-icon {
    display: block;
}

/* Group Form */
.group-form {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.group-avatar-section {
    display: flex;
    align-items: center;
    padding: 20px 30px;
    gap: 15px;
}

.group-avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--wa-search-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wa-icon);
    font-size: 24px;
    cursor: pointer;
}

.group-avatar-section input {
    flex: 1;
    border: none;
    border-bottom: 2px solid var(--wa-green);
    padding: 8px 0;
    font-size: 16px;
    outline: none;
    color: var(--wa-text-primary);
}

.group-description-section {
    padding: 0 30px 15px 30px;
}

.group-description-section input {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--wa-border);
    padding: 8px 0;
    font-size: 14px;
    outline: none;
    color: var(--wa-text-primary);
}

.section-title {
    font-size: 14px;
    font-weight: 400;
    color: var(--wa-green);
    padding: 10px 30px;
}

.selected-participants {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 30px 12px 30px;
    min-height: 0;
}

.selected-chip {
    display: flex;
    align-items: center;
    background: var(--wa-search-bg);
    border-radius: 20px;
    padding: 4px 10px 4px 4px;
    gap: 6px;
    font-size: 13px;
    animation: chipIn 0.15s ease;
}

@keyframes chipIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.selected-chip img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.selected-chip .remove-chip {
    cursor: pointer;
    color: var(--wa-text-light);
    margin-left: 2px;
}

.fab-btn {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--wa-green);
    border: none;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
    transition: background 0.15s;
    z-index: 5;
}

.fab-btn:hover {
    background: var(--wa-green-dark);
}

.fab-btn svg {
    fill: white;
    width: 24px;
    height: 24px;
}

/* ============================================
   PROFILE PANEL
   ============================================ */
.profile-content {
    flex: 1;
    overflow-y: auto;
}

.profile-avatar-section {
    display: flex;
    justify-content: center;
    padding: 28px 0;
    background: var(--wa-panel-bg);
}

.profile-avatar-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
    gap: 4px;
}

.avatar-overlay:hover {
    opacity: 1;
}

.avatar-overlay i {
    font-size: 24px;
}

.avatar-overlay span {
    font-size: 11px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-field {
    padding: 14px 30px;
    background: var(--wa-panel-bg);
    border-bottom: 1px solid var(--wa-border);
}

.profile-field label {
    font-size: 14px;
    color: var(--wa-green-dark);
    display: block;
    margin-bottom: 8px;
}

.field-value {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.field-value span {
    font-size: 17px;
    color: var(--wa-text-primary);
}

.field-edit {
    display: flex;
    align-items: center;
    gap: 8px;
}

.field-edit input {
    flex: 1;
    border: none;
    border-bottom: 2px solid var(--wa-green);
    padding: 6px 0;
    font-size: 17px;
    outline: none;
    color: var(--wa-text-primary);
}

.profile-hint {
    font-size: 13px;
    color: var(--wa-text-light);
    padding: 14px 30px;
    background: var(--wa-panel-bg);
}

.edit-btn {
    width: 30px;
    height: 30px;
}

/* ============================================
   CONTACT INFO PANEL
   ============================================ */
.contact-info-content {
    flex: 1;
    overflow-y: auto;
    background: var(--wa-panel-header);
}

.contact-info-header {
    background: var(--wa-panel-bg);
    text-align: center;
    padding: 28px 30px;
    margin-bottom: 10px;
}

.contact-info-header .avatar-wrapper {
    width: 200px;
    height: 200px;
    margin: 0 auto 16px auto;
}

.contact-info-header h2 {
    font-size: 22px;
    font-weight: 400;
    color: var(--wa-text-primary);
}

.contact-info-header p {
    font-size: 15px;
    color: var(--wa-text-secondary);
}

.info-section {
    background: var(--wa-panel-bg);
    padding: 14px 30px;
    margin-bottom: 10px;
}

.info-section h4 {
    font-size: 14px;
    color: var(--wa-text-secondary);
    margin-bottom: 4px;
}

.info-section p {
    font-size: 16px;
    color: var(--wa-text-primary);
}

.info-section .group-participants {
    list-style: none;
}

.info-section .group-participant {
    display: flex;
    align-items: center;
    padding: 8px 0;
    gap: 12px;
}

.info-section .group-participant img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.info-section .participant-name {
    flex: 1;
    font-size: 15px;
    color: var(--wa-text-primary);
}

.info-section .participant-role {
    font-size: 12px;
    color: var(--wa-text-light);
    background: var(--wa-search-bg);
    padding: 2px 8px;
    border-radius: 4px;
}

/* ============================================
   STATUS PANEL
   ============================================ */
.status-content {
    flex: 1;
    overflow-y: auto;
}

.my-status-section {
    padding: 8px 0;
}

.status-item {
    display: flex;
    align-items: center;
    padding: 13px 20px;
    cursor: pointer;
    transition: background 0.15s;
    gap: 15px;
}

.status-item:hover {
    background: var(--wa-hover);
}

.status-avatar {
    position: relative;
}

.status-avatar .avatar {
    border: 2px solid var(--wa-green);
    padding: 2px;
}

.status-avatar.viewed .avatar {
    border-color: var(--wa-text-light);
}

.status-add-icon {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 22px;
    height: 22px;
    background: var(--wa-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    border: 2px solid white;
}

.status-info h4 {
    font-size: 17px;
    font-weight: 400;
    color: var(--wa-text-primary);
    margin-bottom: 2px;
}

.status-info p {
    font-size: 13px;
    color: var(--wa-text-secondary);
}

.status-section {
    border-top: 1px solid var(--wa-border);
}

/* Status Creator */
.status-creator {
    position: absolute;
    inset: 0;
    background: #1b2b34;
    z-index: 20;
    display: flex;
    flex-direction: column;
}

.status-creator-header {
    padding: 12px 16px;
    display: flex;
    justify-content: flex-end;
}

.status-creator-header .icon-btn {
    color: white;
}

.status-creator-header .icon-btn i {
    color: white;
}

.status-creator-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    transition: background 0.3s;
}

.status-creator-body textarea {
    background: none;
    border: none;
    outline: none;
    color: white;
    font-size: 28px;
    text-align: center;
    width: 100%;
    resize: none;
    line-height: 1.4;
}

.status-creator-body textarea::placeholder {
    color: rgba(255,255,255,.5);
}

.status-creator-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
}

.status-bg-colors {
    display: flex;
    gap: 8px;
}

.color-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.15s;
}

.color-btn.active,
.color-btn:hover {
    border-color: white;
}

/* Status Viewer */
.status-viewer {
    position: fixed;
    inset: 0;
    background: #1b1b1b;
    z-index: 200;
    display: flex;
    flex-direction: column;
}

.status-viewer-header {
    position: relative;
    padding: 0;
}

.status-progress {
    display: flex;
    gap: 3px;
    padding: 8px 12px 0;
}

.status-progress-bar {
    flex: 1;
    height: 2px;
    background: rgba(255,255,255,.3);
    border-radius: 1px;
    overflow: hidden;
}

.status-progress-bar .fill {
    height: 100%;
    background: white;
    border-radius: 1px;
    transition: width 0.1s linear;
}

.status-viewer-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
}

.status-viewer-info .icon-btn {
    color: white;
}

.status-viewer-info .icon-btn i {
    color: white;
}

.status-viewer-info .avatar {
    width: 36px;
    height: 36px;
}

.status-viewer-info h4 {
    color: white;
    font-size: 15px;
    font-weight: 400;
}

.status-viewer-info p {
    color: rgba(255,255,255,.6);
    font-size: 13px;
}

.status-viewer-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.status-viewer-body .status-text-display {
    font-size: 28px;
    color: white;
    text-align: center;
    max-width: 600px;
    line-height: 1.4;
}

.status-viewer-body img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.status-viewer-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
}

.status-viewer-footer input {
    flex: 1;
    border: 1px solid rgba(255,255,255,.3);
    background: none;
    border-radius: 20px;
    padding: 8px 16px;
    color: white;
    font-size: 15px;
    outline: none;
}

.status-viewer-footer input::placeholder {
    color: rgba(255,255,255,.5);
}

.status-viewer-footer .icon-btn svg {
    fill: rgba(255,255,255,.8);
}

/* ============================================
   IMAGE VIEWER MODAL
   ============================================ */
.image-viewer {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.95);
    z-index: 300;
    display: flex;
    flex-direction: column;
}

.image-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
}

.image-viewer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.image-viewer-info .avatar {
    width: 36px;
    height: 36px;
}

.image-viewer-info h4 {
    color: white;
    font-size: 15px;
}

.image-viewer-info p {
    color: rgba(255,255,255,.6);
    font-size: 13px;
}

.image-viewer-actions {
    display: flex;
    gap: 8px;
}

.image-viewer-actions .icon-btn {
    color: white;
}

.image-viewer-actions .icon-btn i {
    color: white;
}

.image-viewer-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.image-viewer-body img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
}

/* ============================================
   CONTEXT MENU
   ============================================ */
.context-menu {
    position: fixed;
    background: var(--wa-dropdown-bg);
    border-radius: 3px;
    box-shadow: 0 2px 5px 0 var(--wa-dropdown-shadow);
    min-width: 180px;
    z-index: 500;
    padding: 10px 0;
    animation: dropdownSlide 0.1s ease;
}

.context-menu ul {
    list-style: none;
}

.context-menu li {
    padding: 9px 58px 9px 24px;
    cursor: pointer;
    font-size: 14.5px;
    color: var(--wa-text-primary);
    transition: background 0.15s;
    white-space: nowrap;
}

.context-menu li:hover {
    background: var(--wa-hover);
}

/* ============================================
   AUTH PAGE
   ============================================ */
.auth-body {
    background: var(--wa-panel-header);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: auto;
}

.auth-body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 222px;
    background: var(--wa-teal);
}

.auth-container {
    position: relative;
    z-index: 1;
    background: var(--wa-panel-bg);
    width: 100%;
    max-width: 480px;
    border-radius: 4px;
    box-shadow: 0 17px 50px 0 rgba(0,0,0,.19), 0 12px 15px 0 rgba(0,0,0,.24);
    padding: 40px 45px;
    margin: 20px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    margin-bottom: 16px;
}

.auth-logo svg {
    width: 60px;
    height: 60px;
}

.auth-header h1 {
    font-size: 22px;
    font-weight: 300;
    color: var(--wa-text-primary);
}

.auth-form h2 {
    font-size: 15px;
    font-weight: 400;
    color: var(--wa-text-secondary);
    text-align: center;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 18px;
}

.input-group {
    display: flex;
    align-items: center;
    border: 1px solid var(--wa-border);
    border-radius: 4px;
    padding: 0 12px;
    transition: border-color 0.2s;
}

.input-group:focus-within {
    border-color: var(--wa-green);
}

.input-group i {
    color: var(--wa-icon-lighter);
    font-size: 16px;
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.input-group:focus-within i {
    color: var(--wa-green);
}

.input-group input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 0;
    font-size: 15px;
    color: var(--wa-text-primary);
    background: none;
}

.input-group input::placeholder {
    color: var(--wa-text-light);
}

.form-error {
    color: #ea0038;
    font-size: 13px;
    text-align: center;
    margin-bottom: 12px;
    min-height: 18px;
}

.auth-btn {
    width: 100%;
    padding: 12px;
    background: var(--wa-green);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s;
}

.auth-btn:hover {
    background: var(--wa-green-dark);
}

.auth-btn:disabled {
    background: var(--wa-text-light);
    cursor: not-allowed;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--wa-text-secondary);
}

.auth-switch a {
    color: var(--wa-green);
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--wa-text-secondary);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Phone Input with Country Code */
.phone-input-group {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.country-code-wrapper {
    flex-shrink: 0;
}

.country-code-select {
    height: 100%;
    min-width: 110px;
    padding: 10px 8px;
    border: 1px solid var(--wa-border);
    border-radius: 4px;
    background: var(--wa-panel-bg);
    color: var(--wa-text-primary);
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238696a0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
}

.country-code-select:focus {
    border-color: var(--wa-green);
}

.phone-number-input {
    flex: 1;
}

.phone-number-input input {
    width: 100%;
}

/* OTP Input */
.otp-input-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 16px 0;
}

.otp-digit {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 500;
    border: 2px solid var(--wa-border);
    border-radius: 8px;
    outline: none;
    color: var(--wa-text-primary);
    background: var(--wa-panel-bg);
    transition: border-color 0.2s, box-shadow 0.2s;
    caret-color: var(--wa-green);
}

.otp-digit:focus {
    border-color: var(--wa-green);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

.otp-digit::selection {
    background: rgba(37, 211, 102, 0.2);
}

/* OTP Actions */
.otp-actions {
    text-align: center;
    margin-top: 16px;
}

.otp-timer {
    font-size: 13px;
    color: var(--wa-text-secondary);
    margin-bottom: 8px;
}

.otp-timer span {
    font-weight: 600;
    color: var(--wa-green);
}

.otp-resend-btn {
    background: none;
    border: none;
    color: var(--wa-green);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background 0.15s;
}

.otp-resend-btn:hover {
    background: rgba(37, 211, 102, 0.08);
    text-decoration: underline;
}

.otp-resend-btn:disabled {
    color: var(--wa-text-light);
    cursor: not-allowed;
}

.otp-change-phone {
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--wa-text-secondary);
    text-decoration: none;
}

.otp-change-phone:hover {
    color: var(--wa-green);
    text-decoration: underline;
}

/* Demo OTP Toast */
.otp-demo-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #1b3a2d;
    color: #25d366;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 15px;
    z-index: 10000;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
    border: 1px solid rgba(37, 211, 102, 0.3);
    line-height: 1.6;
    transition: opacity 0.3s;
    max-width: 320px;
}

.otp-demo-toast strong {
    font-size: 20px;
    letter-spacing: 4px;
}

.otp-demo-toast small {
    color: rgba(255,255,255,0.5);
    font-size: 11px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
}

.auth-footer p {
    font-size: 13px;
    color: var(--wa-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.demo-accounts {
    background: var(--wa-search-bg);
    border-radius: 4px;
    padding: 16px;
    margin-top: 24px;
    text-align: center;
}

.demo-accounts h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--wa-text-primary);
    margin-bottom: 6px;
}

.demo-accounts p {
    font-size: 13px;
    color: var(--wa-text-secondary);
    margin-bottom: 12px;
}

.demo-users {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.demo-user-btn {
    padding: 6px 12px;
    border: 1px solid var(--wa-green);
    border-radius: 20px;
    background: none;
    color: var(--wa-green);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.demo-user-btn:hover {
    background: var(--wa-green);
    color: white;
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--wa-border);
    border-top-color: var(--wa-green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE / MOBILE
   ============================================ */
.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .app-container::before,
    .app-container::after {
        display: none;
    }

    .left-panel {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .right-panel {
        position: absolute;
        inset: 0;
        z-index: 20;
        display: none;
    }

    .right-panel.active {
        display: flex;
    }

    .default-state {
        display: none;
    }

    .mobile-only {
        display: flex;
    }

    .messages-wrapper {
        padding: 12px 16px;
    }

    .side-panel {
        width: 100%;
    }

    .right-side-panel {
        width: 100%;
    }

    .message {
        max-width: 85%;
    }

    .auth-container {
        padding: 30px 24px;
        margin: 10px;
        box-shadow: none;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .left-panel {
        width: 360px;
        min-width: 300px;
    }

    .messages-wrapper {
        padding: 20px 30px;
    }
}

/* ============================================
   CALL OVERLAY
   ============================================ */
.call-overlay {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
}

.call-screen {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.call-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #075e54 0%, #128c7e 50%, #25d366 100%);
    opacity: 0.97;
}

.call-bg.active {
    background: linear-gradient(135deg, #054d44 0%, #075e54 50%, #0a7e6e 100%);
}

.call-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px;
}

.call-avatar-wrapper {
    position: relative;
    width: 128px;
    height: 128px;
    margin-bottom: 24px;
}

.call-avatar {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255,255,255,0.3);
    background: #dfe5e7 url('../img/default-avatar.svg') center/cover no-repeat;
}

.call-pulse {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
    animation: callPulse 1.5s ease-in-out infinite;
}

@keyframes callPulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}

.call-name {
    font-size: 28px;
    font-weight: 400;
    color: white;
    margin-bottom: 8px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.call-status {
    font-size: 16px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 60px;
    animation: callStatusPulse 2s ease-in-out infinite;
}

@keyframes callStatusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.call-timer {
    font-size: 18px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 60px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}

.call-actions {
    display: flex;
    align-items: center;
    gap: 32px;
}

.incoming-actions {
    gap: 80px;
}

.active-call-actions {
    gap: 40px;
}

.call-action-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    color: white;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.call-action-btn:hover {
    transform: scale(1.08);
}

.call-action-btn:active {
    transform: scale(0.95);
}

.call-action-btn.hangup {
    background: #ea0038;
}

.call-action-btn.hangup:hover {
    background: #d50032;
    box-shadow: 0 4px 20px rgba(234,0,56,0.4);
}

.call-action-btn.reject {
    background: #ea0038;
}

.call-action-btn.reject:hover {
    background: #d50032;
}

.call-action-btn.accept {
    background: #00e676;
}

.call-action-btn.accept:hover {
    background: #00c853;
    box-shadow: 0 4px 20px rgba(0,230,118,0.4);
}

.call-action-btn.toggle-btn {
    background: rgba(255,255,255,0.15);
    width: 56px;
    height: 56px;
    font-size: 20px;
}

.call-action-btn.toggle-btn:hover {
    background: rgba(255,255,255,0.25);
}

.call-action-btn.toggle-btn.active {
    background: white;
    color: var(--wa-teal);
}

.call-action-btn.toggle-btn.active:hover {
    background: rgba(255,255,255,0.9);
}

.call-action-btn i {
    color: inherit;
}

/* Call notification badge in header */
.call-ringing {
    animation: ringShake 0.5s ease-in-out infinite;
}

@keyframes ringShake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); }
    75% { transform: rotate(15deg); }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.hidden { display: none !important; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--wa-text-light);
}

.empty-state i {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: .5;
}

.empty-state p {
    font-size: 14px;
}

/* Notification toast */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--wa-text-primary);
    color: white;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 1000;
    animation: toastIn 0.3s ease;
    box-shadow: 0 3px 8px rgba(0,0,0,.3);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Unread separator */
.unread-separator {
    display: flex;
    justify-content: center;
    margin: 12px 0;
}

.unread-separator span {
    background: #cfe9f1;
    color: var(--wa-green-dark);
    font-size: 12.5px;
    padding: 5px 12px;
    border-radius: 8px;
    font-weight: 500;
}
