/* support.css - Professional Support Interface */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family);
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.4;
    min-height: 100vh;
    overflow-x: hidden;
    letter-spacing: 0.2px;
    padding: 0;
    margin: 0;
}

/* Dark Mode Support */
body.active {
    background: hsl(0, 0%, 10%);
    color: hsl(0, 0%, 95%);
}

/* Fixed Header Container */
.header-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: inherit;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
}

body.active .header-container {
    background: rgba(10, 10, 10, 0.9);
    border-bottom-color: hsl(0, 0%, 25%);
}

/* Header */
.header {
    background: var(--surface);
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

body.active .header {
    background: rgba(30, 30, 30, 0.9);
    border-bottom-color: hsl(0, 0%, 25%);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 100%;
    margin: 0 auto;
}

.back-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

body.active .back-btn {
    background: hsl(0, 0%, 25%);
    border-color: hsl(0, 0%, 35%);
    color: hsl(0, 0%, 90%);
}

.back-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(-2px);
}

.header-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.header-title h1 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

body.active .header-title h1 {
    color: hsl(0, 0%, 95%);
}

.header-subtitle {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

body.active .header-subtitle {
    color: hsl(0, 0%, 80%);
}

.header-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.balance-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    color: var(--primary);
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap;
}

body.active .balance-indicator {
    background: rgba(var(--primary-rgb), 0.2);
}

.balance-indicator i {
    font-size: 13px;
}

/* Main Content Area - Slides under header */
.main {
    padding: 0;
    margin: 0;
    width: 100%;
    position: relative;
    overflow: visible;
}

/* Content wrapper that slides under header */
.content-wrapper {
    margin-top: 88px; /* Height of header */
    padding: 0 16px 20px 16px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* Scrollable content area */
.scroll-content {
    height: calc(100vh - 88px); /* Viewport minus header height */
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-right: 4px; /* Space for scrollbar */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.scroll-content::-webkit-scrollbar {
    width: 4px;
}

.scroll-content::-webkit-scrollbar-track {
    background: transparent;
}

.scroll-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.scroll-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

body.active .scroll-content::-webkit-scrollbar-thumb {
    background: hsl(0, 0%, 35%);
}

body.active .scroll-content::-webkit-scrollbar-thumb:hover {
    background: hsl(0, 0%, 45%);
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 30px 20px;
    margin-bottom: 20px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

body.active .hero-section {
    background: hsl(0, 0%, 20%);
    border-color: hsl(0, 0%, 30%);
}

.hero-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--primary);
    font-size: 28px;
    border: 3px solid var(--surface);
    box-shadow: var(--shadow-md);
}

body.active .hero-icon {
    border-color: hsl(0, 0%, 30%);
}

.hero-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

body.active .hero-title {
    color: hsl(0, 0%, 95%);
}

.hero-description {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.5;
}

body.active .hero-description {
    color: hsl(0, 0%, 80%);
}

/* Support Grid */
.support-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.support-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s;
}

.support-link:hover {
    transform: translateY(-2px);
}

.support-link:hover .support-card {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

/* Support Card */
.support-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

body.active .support-card {
    background: hsl(0, 0%, 20%);
    border-color: hsl(0, 0%, 30%);
}

.support-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.support-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.support-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.support-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.active .support-title {
    color: hsl(0, 0%, 95%);
}

.support-description {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.active .support-description {
    color: hsl(0, 0%, 80%);
}

.support-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

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

.status-indicator.offline {
    background: var(--error);
    animation: none;
}

.status-text {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.support-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--text-tertiary);
}

.meta-item i {
    font-size: 10px;
}

.support-action {
    color: var(--text-tertiary);
    font-size: 14px;
    flex-shrink: 0;
}

/* FAQ Section */
.faq-section {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

body.active .faq-section {
    background: hsl(0, 0%, 20%);
    border-color: hsl(0, 0%, 30%);
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.active .section-title {
    color: hsl(0, 0%, 95%);
}

.section-title i {
    color: var(--primary);
    font-size: 18px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    background: var(--bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.2s;
}

body.active .faq-item {
    background: hsl(0, 0%, 15%);
    border-color: hsl(0, 0%, 30%);
}

.faq-item.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(var(--primary-rgb), 0.2);
}

.faq-question {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
    transition: background 0.2s;
}

body.active .faq-question {
    color: hsl(0, 0%, 95%);
}

.faq-question:hover {
    background: rgba(var(--primary-rgb), 0.05);
}

body.active .faq-question:hover {
    background: rgba(var(--primary-rgb), 0.1);
}

.faq-question i {
    color: var(--text-tertiary);
    transition: transform 0.2s;
    font-size: 14px;
}

.faq-answer {
    padding: 0 16px;
    max-height: 0;
    overflow: hidden;
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 13px;
    transition: all 0.3s ease;
}

body.active .faq-answer {
    color: hsl(0, 0%, 80%);
}

.faq-item.active .faq-answer {
    padding: 0 16px 16px;
    max-height: 200px;
}

/* Contact Info */
.contact-info {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

body.active .contact-info {
    background: hsl(0, 0%, 20%);
    border-color: hsl(0, 0%, 30%);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: all 0.2s;
    cursor: pointer;
}

body.active .contact-item {
    background: hsl(0, 0%, 15%);
    border-color: hsl(0, 0%, 30%);
}

.contact-item:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.05);
}

body.active .contact-item:hover {
    background: rgba(var(--primary-rgb), 0.1);
}

.contact-item i {
    color: var(--primary);
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.contact-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.contact-label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

body.active .contact-label {
    color: hsl(0, 0%, 70%);
}

.contact-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-word;
}

body.active .contact-value {
    color: hsl(0, 0%, 95%);
}

/* Page Footer */
.page-footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 20px;
    border-top: 1px solid var(--border);
}

.copyright {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

body.active .copyright {
    color: hsl(0, 0%, 70%);
}

.footer-note {
    font-size: 11px;
    color: var(--text-tertiary);
    font-style: italic;
}

/* Footer Space */
.footer-space {
    height: 40px;
}

/* Chat Modal */
.chat-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.chat-modal.show {
    opacity: 1;
    visibility: visible;
}

.chat-modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.chat-modal.show .chat-modal-content {
    transform: translateY(0);
}

.chat-modal-header {
    padding: 16px 20px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-modal-body {
    padding: 30px 20px;
    text-align: center;
}

.chat-placeholder {
    max-width: 100%;
    overflow: hidden;
}

.chat-placeholder i {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 16px;
    opacity: 0.8;
}

.chat-placeholder h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

body.active .chat-placeholder h4 {
    color: hsl(0, 0%, 95%);
}

.chat-placeholder p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

body.active .chat-placeholder p {
    color: hsl(0, 0%, 80%);
}

.chat-alternative-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--whatsapp);
    color: white;
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    margin-top: 10px;
}

.chat-alternative-btn:hover {
    background: #128C7E;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 16px;
    left: 16px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 12px;
    max-width: 100%;
    transform: translateY(-100px);
    transition: transform 0.3s;
    z-index: 1001;
    border-left: 4px solid var(--primary);
    overflow: hidden;
}

.toast.show {
    transform: translateY(0);
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--error);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 100%;
    overflow: hidden;
}

.toast-icon {
    font-size: 16px;
    color: var(--primary);
    margin-top: 1px;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error .toast-icon {
    color: var(--error);
}

.toast.warning .toast-icon {
    color: var(--warning);
}

.toast-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.toast-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.active .toast-title {
    color: hsl(0, 0%, 95%);
}

.toast-message {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    word-break: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

body.active .toast-message {
    color: hsl(0, 0%, 80%);
}

/* Responsive Design */
@media (max-width: 480px) {
    .header {
        padding: 12px;
    }
    
    .content-wrapper {
        margin-top: 80px;
        padding: 0 12px 16px 12px;
    }
    
    .scroll-content {
        height: calc(100vh - 80px);
    }
    
    .back-btn {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
    
    .header-title h1 {
        font-size: 16px;
    }
    
    .header-subtitle {
        font-size: 11px;
    }
    
    .balance-indicator {
        font-size: 12px;
        padding: 5px 8px;
    }
    
    .hero-section {
        padding: 24px 16px;
    }
    
    .hero-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .hero-title {
        font-size: 20px;
    }
    
    .hero-description {
        font-size: 13px;
    }
    
    .support-card {
        padding: 14px;
        gap: 12px;
    }
    
    .support-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .support-title {
        font-size: 15px;
    }
    
    .support-description {
        font-size: 11px;
    }
    
    .faq-section,
    .contact-info {
        padding: 16px;
    }
    
    .section-title {
        font-size: 15px;
        margin-bottom: 14px;
    }
    
    .faq-question {
        padding: 12px 14px;
        font-size: 13px;
    }
    
    .faq-answer {
        font-size: 12px;
        padding: 0 14px;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 14px 14px;
    }
    
    .contact-item {
        padding: 10px;
        gap: 10px;
    }
    
    .contact-label {
        font-size: 10px;
    }
    
    .contact-value {
        font-size: 12px;
    }
    
    .chat-modal {
        padding: 16px;
    }
    
    .chat-modal-content {
        max-width: 100%;
    }
    
    .toast {
        padding: 10px;
        left: 12px;
        right: 12px;
    }
    
    .toast-title {
        font-size: 13px;
    }
    
    .toast-message {
        font-size: 11px;
    }
}

@media (max-width: 360px) {
    .content-wrapper {
        margin-top: 76px;
    }
    
    .scroll-content {
        height: calc(100vh - 76px);
    }
    
    .support-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .support-content {
        min-width: 0;
    }
    
    .support-title {
        font-size: 14px;
    }
    
    .support-description {
        -webkit-line-clamp: 3;
    }
    
    .header-title h1 {
        font-size: 15px;
    }
    
    .balance-indicator {
        font-size: 11px;
        padding: 4px 6px;
    }
}

@media (max-width: 320px) {
    .header-title h1 {
        font-size: 14px;
    }
    
    .hero-title {
        font-size: 18px;
    }
    
    .support-title {
        font-size: 13px;
    }
    
    .section-title {
        font-size: 14px;
    }
}

/* Prevent text overflow globally */
.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ensure all containers have proper max-width */
.container {
    max-width: 100%;
    overflow: hidden;
}

/* Smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    .scroll-content {
        height: calc(100vh - 88px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    }
    
    @media (max-width: 480px) {
        .scroll-content {
            height: calc(100vh - 80px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        }
    }
    
    .chat-modal {
        padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    }
}

/* Loading animation for support cards */
.support-card.loading {
    position: relative;
    overflow: hidden;
}

.support-card.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% { left: 100%; }
}

body.active .support-card.loading::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
}

/* Accessibility improvements */
.support-card:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.faq-question:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
    border-radius: var(--radius-sm);
}