/* assets/css/live_chat.css - FinTrGo Glassmorphic Live Chat System */

/* Floating Trigger Button */
.live-chat-trigger-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d9488 0%, #0FA58A 100%);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px -5px rgba(13, 148, 136, 0.4), 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 999990;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    animation: lcPulse 3s infinite;
}

.live-chat-trigger-btn:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(13, 148, 136, 0.5);
}

/* Agent Connected Green Pulse */
.live-chat-trigger-btn.agent-connected {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    animation: lcAgentPulse 2s infinite;
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.5);
}

@keyframes lcAgentPulse {
    0%, 100% { box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.5); }
    50% { box-shadow: 0 10px 32px 8px rgba(16, 185, 129, 0.7); }
}

@keyframes lcPulse {
    0%, 100% { box-shadow: 0 10px 25px -5px rgba(13, 148, 136, 0.4); }
    50% { box-shadow: 0 10px 30px 5px rgba(13, 148, 136, 0.6); }
}

.lc-unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 99px;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
    display: none;
}

.lc-online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid #ffffff;
}

/* Chat Modal Box */
.lc-widget-box {
    position: fixed;
    bottom: 95px;
    right: 25px;
    width: 400px;
    height: 620px;
    max-width: calc(100vw - 30px);
    max-height: calc(100vh - 120px);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    box-shadow: 0 20px 50px -10px rgba(15, 23, 42, 0.25), 0 10px 20px -5px rgba(13, 148, 136, 0.1);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 999991;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lc-widget-box.active {
    display: flex;
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Header */
.lc-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lc-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lc-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #0d9488;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

.lc-header-avatar.agent-connected {
    background: #10b981;
}

.lc-header-text h4 {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lc-header-code-tag {
    background: rgba(13, 148, 136, 0.3);
    color: #2dd4bf;
    border: 1px solid rgba(45, 212, 191, 0.3);
    font-family: monospace;
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: 6px;
}

.lc-header-status-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 99px;
    text-transform: uppercase;
}

.lc-header-status-badge.active { background: #f0fdfa; color: #0d9488; }
.lc-header-status-badge.closed { background: #f1f5f9; color: #64748b; }

.lc-header-text p {
    margin: 2px 0 0 0;
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 5px;
}

.lc-header-text p span.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
}

.lc-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lc-action-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.lc-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Nav Tabs Header */
.lc-nav-tabs {
    display: flex;
    background: #0f172a;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.lc-nav-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.lc-nav-tab.active {
    color: #2dd4bf;
    border-bottom-color: #0d9488;
    background: rgba(255,255,255,0.04);
}

/* Body / Screens */
.lc-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Form Screen */
.lc-form-screen {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    background: #ffffff;
}

.lc-welcome-banner {
    text-align: center;
    margin-bottom: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 1rem;
    border-radius: 16px;
}

.lc-welcome-banner h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}

.lc-welcome-banner p {
    margin: 0 0 8px 0;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}

.lc-response-time-tag {
    font-size: 0.72rem;
    color: #0d9488;
    background: #f0fdfa;
    border: 1px solid #ccfbf1;
    padding: 4px 10px;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
}

.lc-form-group {
    margin-bottom: 0.8rem;
}

.lc-form-group label {
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 4px;
}

.lc-form-input, .lc-form-select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s;
    background: #f8fafc;
    color: #0f172a;
    box-sizing: border-box;
}

.lc-form-input[readonly] {
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

.lc-form-input:focus, .lc-form-select:focus {
    border-color: #0d9488;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.lc-btn-start {
    width: 100%;
    background: #0d9488;
    color: #ffffff;
    border: none;
    padding: 11px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 0.8rem;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

.lc-btn-start:hover {
    background: #0f766e;
}

/* Chat Screen */
.lc-chat-messages {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lc-msg-row {
    display: flex;
    flex-direction: column;
    max-width: 82%;
}

.lc-msg-row.user {
    align-self: flex-end;
    align-items: flex-end;
}

.lc-msg-row.admin {
    align-self: flex-start;
    align-items: flex-start;
}

.lc-msg-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.88rem;
    line-height: 1.45;
    word-break: break-word;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.lc-msg-row.user .lc-msg-bubble {
    background: linear-gradient(135deg, #0d9488 0%, #0FA58A 100%);
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.lc-msg-row.admin .lc-msg-bubble {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    border-bottom-left-radius: 4px;
}

.lc-msg-meta {
    font-size: 0.65rem;
    margin-top: 4px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Closed Status Bar */
.lc-closed-lock-bar {
    background: #fef2f2;
    border-top: 1px solid #fca5a5;
    color: #991b1b;
    padding: 10px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.lc-status-pill {
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.lc-status-active { background: #f0fdfa; color: #0d9488; border: 1px solid #ccfbf1; }
.lc-status-closed { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }

/* -------------------------------------------------------------------------- */
/* REDESIGNED MODERN MESSAGE COMPOSER (BOTTOM AREA) */
/* -------------------------------------------------------------------------- */
.lc-chat-footer {
    padding: 12px 14px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    position: sticky;
    bottom: 0;
    z-index: 10;
    box-sizing: border-box;
}

.lc-composer-box {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 20px;
    padding: 4px 6px 4px 12px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.lc-composer-box:focus-within {
    border-color: #0d9488;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

.lc-btn-attach {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.lc-btn-attach:hover {
    color: #0d9488;
    background: #f0fdfa;
}

.lc-composer-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 8px;
    font-size: 0.88rem;
    color: #0f172a;
    outline: none;
    font-family: inherit;
}

.lc-composer-input::placeholder {
    color: #94a3b8;
}

.lc-btn-send {
    background: linear-gradient(135deg, #0d9488 0%, #0FA58A 100%);
    color: #ffffff;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 10px rgba(13, 148, 136, 0.25);
    flex-shrink: 0;
}

.lc-btn-send:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 14px rgba(13, 148, 136, 0.35);
}

.lc-btn-send:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.lc-btn-send.loading {
    background: #0f766e;
}

/* Attachment Chip Preview */
.lc-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f0fdfa;
    border: 1px solid #ccfbf1;
    color: #0d9488;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.lc-file-chip i.close-chip {
    cursor: pointer;
    color: #ef4444;
    transition: all 0.2s;
}

.lc-file-chip i.close-chip:hover {
    transform: scale(1.2);
}

/* History Screen - Compact Top Layout */
.lc-history-screen {
    padding: 0.75rem 1rem 1rem 1rem;
    overflow-y: auto;
    background: #f8fafc;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.lc-history-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 0.75rem;
    margin-top: 0;
}

.lc-history-search {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.82rem;
    outline: none;
    background: #ffffff;
}

.lc-history-filter {
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.8rem;
    outline: none;
    background: #ffffff;
    font-weight: 600;
}

.lc-history-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.lc-history-item:hover {
    transform: translateY(-2px);
    border-color: #0d9488;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.1);
}

.lc-history-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.lc-history-code {
    font-family: monospace;
    font-weight: 800;
    font-size: 0.8rem;
    color: #0f172a;
}

.lc-history-subject {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lc-history-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #94a3b8;
}

/* Feedback Modal Overlay */
.lc-feedback-overlay {
    display: none;
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 999995;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.lc-feedback-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 1.75rem 1.5rem;
    width: 100%;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.lc-feedback-card h4 {
    margin: 0 0 6px 0;
    font-size: 1.1rem;
    color: #0f172a;
}

.lc-feedback-card p {
    margin: 0 0 1.25rem 0;
    font-size: 0.8rem;
    color: #64748b;
}

.lc-star-rating {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 1.25rem;
    font-size: 1.6rem;
    color: #cbd5e1;
    cursor: pointer;
}

.lc-star-rating i.active {
    color: #f59e0b;
}

.lc-thumbs-wrapper {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 1.5rem;
}

.lc-thumb-btn {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 8px 18px;
    border-radius: 12px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.lc-thumb-btn.active {
    background: #f0fdfa;
    border-color: #0d9488;
    color: #0d9488;
}

.lc-btn-feedback-submit {
    width: 100%;
    background: #0d9488;
    color: #ffffff;
    border: none;
    padding: 10px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
}

/* Lightbox Modal */
.lc-lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.85);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lc-lightbox img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 12px;
}
