@import url('https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ==========================================================================
   Maskan Unified Live Chat & Voice Messenger Styles
   ========================================================================== */

/* Floating Chat Pill */
.maskan-chat-pill {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99998;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #059669, #047857);
    color: #ffffff;
    padding: 12px 22px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 25px -3px rgba(5, 150, 105, 0.4), 0 4px 6px -2px rgba(5, 150, 105, 0.2);
    font-family: 'Noto Kufi Arabic', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    direction: rtl;
    user-select: none;
}
.maskan-chat-pill:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 14px 28px -4px rgba(5, 150, 105, 0.5), 0 6px 10px -2px rgba(5, 150, 105, 0.25);
    background: linear-gradient(135deg, #10b981, #059669);
}
.maskan-chat-pill-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.maskan-chat-badge {
    position: absolute;
    top: -6px;
    left: -4px;
    background: #ef4444;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    min-width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    border-radius: 11px;
    padding: 0 6px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
    animation: maskan-pulse 2s infinite;
}
@keyframes maskan-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* Modal Chat Window */
.maskan-chat-modal {
    position: fixed;
    bottom: 90px;
    right: 24px;
    z-index: 99999;
    width: 880px;
    max-width: calc(100vw - 32px);
    height: 620px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px -10px rgba(15, 23, 42, 0.3), 0 10px 20px -5px rgba(15, 23, 42, 0.15);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    font-family: 'Noto Kufi Arabic', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    direction: rtl;
    animation: maskan-fade-up 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes maskan-fade-up {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.maskan-chat-modal-inner,
.maskan-chat-standalone-container {
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #f8fafc;
}

/* Sidebar (Threads) */
.maskan-chat-sidebar {
    width: 320px;
    flex-shrink: 0;
    border-left: 1px solid #e2e8f0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.maskan-chat-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
}
.maskan-chat-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.maskan-chat-brand-icon {
    font-size: 20px;
}
.maskan-chat-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}
.maskan-chat-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    margin-left: 4px;
}
.maskan-chat-status-text {
    font-size: 11px;
    color: #64748b;
}
.maskan-chat-sidebar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.maskan-chat-icon-btn {
    background: transparent;
    border: none;
    color: #64748b;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.maskan-chat-icon-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Search bar */
.maskan-chat-search-wrap {
    padding: 10px 16px;
    border-bottom: 1px solid #f1f5f9;
}
.maskan-chat-search-wrap input {
    width: 100%;
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 13px;
    outline: none;
    transition: border 0.2s;
    direction: rtl;
    box-sizing: border-box;
}
.maskan-chat-search-wrap input:focus {
    border-color: #059669;
    background: #ffffff;
}

/* Threads List */
.maskan-chat-threads-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}
.maskan-thread-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s;
    margin-bottom: 4px;
    position: relative;
    border: 1px solid transparent;
}
.maskan-thread-item:hover {
    background: #f1f5f9;
}
.maskan-thread-item.active {
    background: #ecfdf5;
    border-color: #a7f3d0;
}
.maskan-thread-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    overflow: hidden;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.maskan-thread-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.maskan-thread-content {
    flex: 1;
    min-width: 0;
}
.maskan-thread-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.maskan-thread-name {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.maskan-thread-time {
    font-size: 11px;
    color: #94a3b8;
    flex-shrink: 0;
}
.maskan-thread-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.maskan-thread-preview {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}
.maskan-thread-badge {
    background: #059669;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    padding: 0 5px;
    margin-right: 6px;
    flex-shrink: 0;
}

/* Main Chat Area */
.maskan-chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #f8fafc;
    min-width: 0;
}
.maskan-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}
.maskan-chat-header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.maskan-chat-back-btn {
    display: none;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
}
.maskan-chat-header-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ecfdf5;
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid #a7f3d0;
}
.maskan-chat-header-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.maskan-chat-header-info {
    min-width: 0;
}
.maskan-chat-header-info h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.maskan-chat-header-sub {
    font-size: 12px;
    color: #64748b;
}

/* Messages container */
.maskan-chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
}
.maskan-chat-empty-state {
    margin: auto;
    text-align: center;
    max-width: 360px;
    padding: 30px 20px;
    color: #64748b;
}
.maskan-chat-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.maskan-chat-empty-state h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 18px;
}
.maskan-chat-empty-state p {
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}

/* Message Rows */
.maskan-msg {
    display: flex;
    flex-direction: column;
    max-width: 75%;
    position: relative;
}
.maskan-msg.me {
    align-self: flex-start; /* In RTL, flex-start is right side */
    align-items: flex-start;
}
.maskan-msg.them {
    align-self: flex-end; /* In RTL, flex-end is left side */
    align-items: flex-end;
}
.maskan-msg-sender {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 4px;
    padding: 0 6px;
    font-weight: 600;
}
.maskan-bubble {
    padding: 10px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.maskan-msg.me .maskan-bubble {
    background: linear-gradient(135deg, #059669, #047857);
    color: #ffffff;
    border-bottom-right-radius: 4px;
}
.maskan-msg.them .maskan-bubble {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}
.maskan-msg-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding: 0 4px;
    font-size: 10px;
    color: #94a3b8;
}
.maskan-msg.me .maskan-msg-meta {
    justify-content: flex-start;
}
.maskan-msg.them .maskan-msg-meta {
    justify-content: flex-end;
}

/* Image Attachment */
.maskan-msg-image {
    max-width: 280px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}
.maskan-msg-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.2s;
}
.maskan-msg-image:hover img {
    transform: scale(1.02);
}

/* File Attachment Card */
.maskan-msg-file {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0,0,0,0.04);
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0,0,0,0.06);
    transition: background 0.15s;
}
.maskan-msg.me .maskan-msg-file {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.25);
    color: #ffffff;
}
.maskan-file-icon {
    font-size: 24px;
}
.maskan-file-details {
    flex: 1;
    min-width: 0;
}
.maskan-file-name {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.maskan-file-size {
    font-size: 11px;
    opacity: 0.8;
}

/* Voice Note Audio Player */
.maskan-voice-player {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    padding: 4px 0;
}
.maskan-voice-play-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    flex-shrink: 0;
    transition: transform 0.15s;
}
.maskan-voice-play-btn:hover {
    transform: scale(1.06);
}
.maskan-msg.them .maskan-voice-play-btn {
    background: #059669;
    color: #ffffff;
}
.maskan-voice-track {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.maskan-voice-waveform {
    height: 18px;
    display: flex;
    align-items: center;
    gap: 3px;
}
.maskan-voice-waveform span {
    width: 3px;
    height: 6px;
    background: rgba(255,255,255,0.6);
    border-radius: 2px;
    transition: height 0.15s ease;
}
.maskan-msg.them .maskan-voice-waveform span {
    background: #cbd5e1;
}
.maskan-voice-player.playing .maskan-voice-waveform span {
    animation: maskan-wave 0.8s ease-in-out infinite alternate;
}
.maskan-voice-waveform span:nth-child(2) { animation-delay: 0.1s; }
.maskan-voice-waveform span:nth-child(3) { animation-delay: 0.2s; }
.maskan-voice-waveform span:nth-child(4) { animation-delay: 0.3s; }
.maskan-voice-waveform span:nth-child(5) { animation-delay: 0.4s; }
.maskan-voice-waveform span:nth-child(6) { animation-delay: 0.2s; }
.maskan-voice-waveform span:nth-child(7) { animation-delay: 0.35s; }
@keyframes maskan-wave {
    0% { height: 4px; }
    100% { height: 18px; }
}

.maskan-voice-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    opacity: 0.85;
}
.maskan-voice-speed-btn {
    background: rgba(255,255,255,0.25);
    border: none;
    color: inherit;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    cursor: pointer;
}
.maskan-msg.them .maskan-voice-speed-btn {
    background: #f1f5f9;
}

/* Voice Recording Overlay Bar */
.maskan-chat-recording-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: #fef2f2;
    border-top: 1px solid #fee2e2;
}
.maskan-recording-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
}
.maskan-rec-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ef4444;
    animation: maskan-pulse 1.2s infinite;
}
#maskan-rec-timer {
    font-size: 14px;
    font-weight: 700;
    color: #991b1b;
}
.maskan-rec-waveform {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 16px;
}
.maskan-rec-waveform i {
    width: 3px;
    height: 12px;
    background: #ef4444;
    border-radius: 2px;
    animation: maskan-wave 0.6s infinite alternate;
}
.maskan-recording-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.maskan-rec-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s;
}
.maskan-rec-btn.cancel {
    background: #fee2e2;
    color: #dc2626;
}
.maskan-rec-btn.send {
    background: #059669;
    color: #ffffff;
}

/* Chat Input Footer */
.maskan-chat-footer {
    padding: 12px 18px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}
.maskan-chat-input-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}
.maskan-chat-control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}
.maskan-chat-control-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}
.maskan-chat-control-btn.send {
    background: #059669;
    color: #ffffff;
}
.maskan-chat-control-btn.send:hover {
    background: #047857;
}
.maskan-chat-control-btn.mic:hover {
    background: #fee2e2;
    color: #ef4444;
}
.maskan-chat-input-row textarea {
    flex: 1;
    resize: none;
    max-height: 100px;
    padding: 10px 14px;
    border-radius: 20px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
    line-height: 1.4;
    outline: none;
    direction: rtl;
    box-sizing: border-box;
    font-family: 'Noto Kufi Arabic', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    transition: border 0.2s;
}
.maskan-chat-input-row textarea:focus {
    border-color: #059669;
}

/* Quick CTA Buttons */
.maskan-quick-desk-btn {
    transition: transform 0.2s, box-shadow 0.2s;
}
.maskan-quick-desk-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.4);
}

/* User Picker Overlay (Admin / Staff) */
.maskan-user-picker-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    direction: rtl;
    animation: maskan-fade-up 0.2s ease;
}
.maskan-user-picker-card {
    background: #ffffff;
    width: 100%;
    max-width: 520px;
    max-height: 85%;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}
.maskan-user-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
}
.maskan-user-picker-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}
.maskan-user-picker-controls {
    padding: 14px 20px;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
}
.maskan-user-picker-controls input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
    direction: rtl;
}
.maskan-user-picker-controls input:focus {
    border-color: #059669;
    background: #ffffff;
}
.maskan-picker-role-tabs {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.maskan-picker-tab {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}
.maskan-picker-tab:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.maskan-picker-tab.active {
    background: #059669;
    color: #ffffff;
    border-color: #059669;
}
.maskan-user-picker-results {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px;
    max-height: 320px;
}
.maskan-user-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f8fafc;
}
.maskan-user-result-item:hover {
    background: #ecfdf5;
}
.maskan-user-result-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    overflow: hidden;
    flex-shrink: 0;
}
.maskan-user-result-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.maskan-user-result-info {
    flex: 1;
    min-width: 0;
}
.maskan-user-result-name {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}
.maskan-user-result-role {
    font-size: 11px;
    color: #059669;
    background: #d1fae5;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.maskan-user-result-meta {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.maskan-user-result-action {
    background: #059669;
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .maskan-chat-pill {
        bottom: 76px !important;
        right: 14px !important;
    }
    .maskan-chat-modal {
        position: fixed;
        inset: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        border: none;
        bottom: 0;
        right: 0;
    }
    .maskan-chat-sidebar {
        width: 100%;
    }
    .maskan-chat-main {
        display: none;
        width: 100%;
    }
    .maskan-chat-modal.chat-active .maskan-chat-sidebar {
        display: none;
    }
    .maskan-chat-modal.chat-active .maskan-chat-main {
        display: flex;
    }
    .maskan-chat-back-btn {
        display: block;
    }
}

/* Picker Instant Desk Button */
.maskan-picker-desk-btn {
    width: 100%;
    background: linear-gradient(135deg, #059669, #047857);
    color: #ffffff;
    border: none;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
    transition: all 0.2s;
    margin-bottom: 6px;
}
.maskan-picker-desk-btn:hover {
    background: linear-gradient(135deg, #10b981, #059669);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.35);
}


/* ==========================================================================
   Maskan Professional Chat UI Enhancements
   ========================================================================== */

/* Universal Font Stack */
.maskan-chat-modal,
.maskan-app-shell,
.maskan-chat-sidebar,
.maskan-chat-main,
.maskan-user-picker-card {
    font-family: 'Noto Kufi Arabic', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
}

/* Sidebar Width on Desktop */
.maskan-chat-sidebar {
    width: 380px !important;
    border-left: 1px solid #e2e8f0;
}

/* Thread Item Typography & Polish */
.maskan-thread-item {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 4px;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}
.maskan-thread-item:hover {
    background: #f1f5f9;
}
.maskan-thread-item.active {
    background: #ecfdf5 !important;
    border-color: #a7f3d0 !important;
    border-right: 3.5px solid #059669 !important;
}
.maskan-thread-name {
    font-size: 14.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    display: flex;
    align-items: center;
    gap: 6px;
}
.maskan-thread-time {
    font-size: 11.5px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    direction: rtl;
}
.maskan-thread-preview {
    font-size: 12.5px !important;
    color: #64748b !important;
    line-height: 1.4;
}

/* Header Polish */
.maskan-chat-header {
    height: 68px;
    padding: 12px 24px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.maskan-chat-header-info h4 {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.2px;
}
.maskan-chat-header-sub {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #059669 !important;
    display: inline-block;
    background: #ecfdf5;
    padding: 2px 8px;
    border-radius: 8px;
    margin-top: 2px;
}

/* Chat Messages Wall Polish */
.maskan-chat-messages-container {
    background: #f8fafc !important;
    padding: 24px !important;
    gap: 14px !important;
}

/* Message Bubble Polish */
.maskan-msg {
    max-width: 72% !important;
}
.maskan-bubble {
    padding: 12px 18px !important;
    font-size: 14.5px !important;
    line-height: 1.55 !important;
    border-radius: 20px !important;
}
.maskan-msg.me .maskan-bubble {
    background: linear-gradient(135deg, #059669, #047857) !important;
    color: #ffffff !important;
    border-bottom-right-radius: 4px !important;
    box-shadow: 0 4px 14px rgba(5,150,105,0.25) !important;
}
.maskan-msg.them .maskan-bubble {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
    border-bottom-left-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(15,23,42,0.04) !important;
}
.maskan-msg-meta {
    font-size: 11px !important;
    margin-top: 5px !important;
    gap: 6px !important;
    font-weight: 600;
}
.maskan-msg.me .maskan-msg-meta {
    color: #94a3b8;
}
.maskan-msg.them .maskan-msg-meta {
    color: #94a3b8;
}
.maskan-checkmarks {
    font-size: 12px;
    letter-spacing: -1px;
    color: #94a3b8;
}
.maskan-checkmarks.read {
    color: #0284c7 !important; /* WhatsApp blue ticks */
    font-weight: 900;
}

/* Input Bar Polish */
.maskan-chat-footer {
    padding: 14px 20px !important;
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.03);
}
.maskan-chat-input-row textarea {
    padding: 12px 18px !important;
    font-size: 14.5px !important;
    border-radius: 24px !important;
    border: 1.5px solid #cbd5e1 !important;
    background: #f8fafc !important;
    line-height: 1.4 !important;
    font-family: inherit !important;
}
.maskan-chat-input-row textarea:focus {
    background: #ffffff !important;
    border-color: #059669 !important;
    box-shadow: 0 0 0 3px rgba(5,150,105,0.12) !important;
}
.maskan-chat-control-btn.send {
    background: linear-gradient(135deg, #059669, #047857) !important;
    box-shadow: 0 4px 12px rgba(5,150,105,0.3) !important;
    width: 44px !important;
    height: 44px !important;
}
.maskan-chat-control-btn.send:hover {
    transform: scale(1.05);
}
