/* ================================================
   Pelora — Customer Support Page Styles
   Extracted from support/customer-support.html inline <style>
   ================================================ */

/* ── Support Page Layout ─────────────────────── */
.support-page {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    min-height: calc(100vh - 160px);
}

/* ── Left Column: Info Cards ─────────────────── */
.support-info {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    backdrop-filter: blur(10px);
}

.support-info h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.support-info > p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
}

.support-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.support-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: var(--transition);
}

.support-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(124, 76, 255, 0.15);
}

.support-card h3 {
    color: var(--accent-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.support-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.support-card a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.support-card a:hover {
    text-decoration: underline;
}

.support-card.full-width {
    grid-column: 1 / -1;
}

.support-card .hours-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.support-card .hours-list strong {
    color: var(--text-primary);
}

/* ── Right Column: Chat Widget ───────────────── */
.chat-widget {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, var(--accent-primary), #9333ea);
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: fit-content;
    max-height: calc(100vh - 120px);
    position: sticky;
    top: 90px;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: rgba(0, 0, 0, 0.15);
}

.chat-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}

.chat-header-info h3 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.chat-header-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    margin: 0;
}

.chat-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4ade80;
    margin-left: auto;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}

/* ── Chat Messages Area ──────────────────────── */
.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 350px;
    max-height: 450px;
    background: var(--bg-primary);
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(124, 76, 255, 0.3); border-radius: 4px; }

.msg {
    display: flex;
    flex-direction: column;
    max-width: 85%;
}

.msg.ai { align-self: flex-start; }
.msg.user { align-self: flex-end; }

.msg-bubble {
    padding: 0.85rem 1.1rem;
    border-radius: 16px;
    font-size: 0.92rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.msg.ai .msg-bubble {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.msg.user .msg-bubble {
    background: linear-gradient(135deg, var(--accent-primary), #9333ea);
    color: white;
    border-bottom-right-radius: 4px;
}

.msg-time {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
    padding: 0 0.25rem;
}

.msg.user .msg-time {
    text-align: right;
}

/* ── Typing Indicator ────────────────────────── */
.typing-indicator {
    display: none;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--glass-border);
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

.typing-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* ── Auth Hint ─────────────────────────────── */
.support-auth-hint {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    background: rgba(124, 76, 255, 0.12);
    border-top: 1px solid rgba(124, 76, 255, 0.28);
    color: #e8e0ff;
    font-size: 0.86rem;
}

.support-auth-hint.active {
    display: flex;
}

.support-auth-signin-btn {
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.42rem 0.78rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.support-auth-signin-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.35);
}

/* ── Chat Input ──────────────────────────────── */
.chat-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-primary);
    border-top: 1px solid var(--glass-border);
}

.chat-input-wrap input {
    flex: 1;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 0.75rem 1.25rem;
    color: var(--text-primary);
    font-size: 0.92rem;
    outline: none;
    transition: var(--transition);
}

.chat-input-wrap input:focus {
    border-color: var(--accent-primary);
    background: rgba(124, 76, 255, 0.05);
}

.chat-input-wrap input::placeholder {
    color: var(--text-secondary);
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.chat-send-btn:hover {
    background: #6B3FE6;
    transform: scale(1.05);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chat-send-btn svg {
    width: 20px;
    height: 20px;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 900px) {
    .support-page {
        grid-template-columns: 1fr;
        margin: 1.5rem auto;
        padding: 0 1rem;
    }

    .chat-widget {
        position: static;
        max-height: 500px;
    }

    .support-info h1 {
        font-size: 2rem;
    }
}

@media (max-width: 600px) {
    header .container {
        padding: 0.75rem 1rem !important;
    }

    header .logo {
        font-size: 1.05rem !important;
    }

    header .logo svg {
        width: 20px !important;
        height: 20px !important;
    }

    header .container > a:last-child {
        font-size: 0.85rem !important;
    }

    .support-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .support-info {
        padding: 2rem 1.5rem;
    }

    .support-info h1 {
        font-size: 1.6rem;
    }

    .chat-messages {
        min-height: 280px;
        max-height: 350px;
    }
}

@media (max-width: 480px) {
    .support-page {
        margin: 1rem auto;
        padding: 0 0.75rem;
    }

    .support-info {
        padding: 1.5rem 1rem;
    }

    .support-info h1 {
        font-size: 1.45rem;
    }

    .support-info > p {
        font-size: 0.92rem;
        margin-bottom: 1.75rem;
    }

    .support-card {
        padding: 1rem;
    }

    .chat-header {
        padding: 1rem;
    }

    .chat-messages {
        padding: 1rem;
        min-height: 240px;
        max-height: 320px;
    }

    .chat-input-wrap {
        padding: 0.75rem;
        gap: 0.5rem;
    }
}

.support-info,
.support-card {
    background: rgba(255, 255, 255, 0.84);
    border-color: rgba(143, 113, 228, 0.16);
    box-shadow: 0 16px 34px rgba(111, 92, 170, 0.08);
}

.chat-widget {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 244, 255, 0.98) 100%);
    border: 1px solid rgba(143, 113, 228, 0.18);
    box-shadow: 0 22px 48px rgba(111, 92, 170, 0.14);
}

.chat-header {
    background: rgba(139, 92, 246, 0.08);
    border-bottom: 1px solid rgba(143, 113, 228, 0.12);
}

.chat-avatar {
    background: rgba(139, 92, 246, 0.14);
    color: #8b5cf6;
}

.chat-header-info h3 {
    color: #2b2145;
}

.chat-header-info p {
    color: #71658f;
}

.chat-messages,
.chat-input-wrap {
    background: rgba(255, 255, 255, 0.92);
}

.msg.ai .msg-bubble,
.typing-indicator,
.chat-input-wrap input {
    background: rgba(255, 255, 255, 0.86);
    border-color: rgba(143, 113, 228, 0.14);
}

.typing-label,
.msg-time {
    color: #71658f;
}

.support-auth-hint {
    background: rgba(139, 92, 246, 0.08);
    border-top-color: rgba(139, 92, 246, 0.18);
    color: #71658f;
}

.support-auth-signin-btn {
    border-color: rgba(143, 113, 228, 0.16);
    background: rgba(255, 255, 255, 0.84);
    color: #2b2145;
}

.support-auth-signin-btn:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.28);
}

.chat-input-wrap input:focus {
    background: rgba(255, 255, 255, 0.96);
}
