/* =====================================================================
   Zando Africa - Main Stylesheet
   Theme: Black / Grey / White
   Border Radius: 0.5rem
   Fonts: Poppins (headings) + Open Sans (body)
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Poppins:wght@500;600;700&display=swap');

:root {
    /* Primary Colors - Dark Theme */
    --zando-primary: #212121;
    --zando-primary-dark: #000000;
    --zando-primary-light: #424242;
    --zando-primary-pale: #F5F5F5;

    /* Legacy aliases (kept for compatibility) */
    --zando-blue: #212121;
    --zando-blue-dark: #000000;
    --zando-blue-light: #424242;
    --zando-blue-pale: #F5F5F5;

    /* Neutral Colors */
    --text-dark: #1F2937;
    --text-medium: #4B5563;
    --text-muted: #6B7280;
    --text-light: #9CA3AF;

    /* Background Colors */
    --bg-white: #ffffff;
    --bg-light: #F9FAFB;
    --bg-gray: #F3F4F6;

    /* Border Colors */
    --border-light: #E5E7EB;
    --border-medium: #D1D5DB;

    /* Status Colors */
    --success: #10B981;
    --success-light: #D1FAE5;
    --error: #EF4444;
    --error-light: #FEE2E2;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;

    /* Spacing & Sizing */
    --border-radius: 0.5rem;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.08);
}

/* =====================================================================
   Base Styles
   ===================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* =====================================================================
   Master Wrapper
   ===================================================================== */

.master-wrapper {
    width: 100%;
    max-width: 650px;
    padding: 40px 20px;
    animation: slideUp 0.5s ease-out;
}

.policy-wrapper {
    max-width: 800px;
}

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

/* =====================================================================
   Card Styles
   ===================================================================== */

.support-card,
.policy-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: 30px;
}

/* =====================================================================
   Header Styles
   ===================================================================== */

.support-header {
    background: var(--zando-blue);
    color: var(--bg-white);
    padding: 40px;
    display: flex;
    align-items: center;
    gap: 25px;
}

.policy-header {
    background: var(--zando-blue);
    color: var(--bg-white);
    padding: 50px 40px;
    text-align: center;
}

.brand-box {
    background: var(--bg-white);
    padding: 8px;
    border-radius: var(--border-radius);
    line-height: 0;
}

.project-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.header-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
}

.header-text p,
.policy-header p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 5px 0 0 0;
}

.policy-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.last-updated {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* =====================================================================
   About Section
   ===================================================================== */

.about-section {
    background: var(--bg-gray);
    padding: 25px 40px;
    border-bottom: 1px solid var(--border-light);
}

.about-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--zando-blue-pale);
    color: var(--zando-blue-dark);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.about-badge svg {
    width: 16px;
    height: 16px;
}

.about-text {
    color: var(--text-medium);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* =====================================================================
   Form Styles
   ===================================================================== */

.support-body {
    padding: 40px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

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

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: var(--text-medium);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-light);
    background: var(--bg-white);
    font-size: 1rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    outline: none;
    color: var(--text-dark);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--zando-blue);
    box-shadow: 0 0 0 3px var(--zando-blue-pale);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 45px;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* =====================================================================
   Type Selector (Feedback Page)
   ===================================================================== */

.type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.type-option {
    cursor: pointer;
}

.type-option input {
    display: none;
}

.type-card {
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.type-card svg {
    width: 32px;
    height: 32px;
    stroke: var(--text-muted);
    margin-bottom: 10px;
}

.type-card span {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.type-card small {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.type-option input:checked + .type-card {
    border-color: var(--zando-blue);
    background: var(--zando-blue-pale);
}

.type-option input:checked + .type-card svg {
    stroke: var(--zando-blue);
}

.type-option:hover .type-card {
    border-color: var(--zando-blue-light);
}

/* =====================================================================
   Rating Selector
   ===================================================================== */

.rating-selector {
    display: flex;
    gap: 8px;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.rating-selector input {
    display: none;
}

.rating-selector label {
    cursor: pointer;
    padding: 5px;
}

.rating-selector label svg {
    width: 28px;
    height: 28px;
    fill: var(--border-medium);
    stroke: var(--border-medium);
    stroke-width: 1;
    transition: all 0.2s ease;
}

.rating-selector label:hover svg,
.rating-selector label:hover ~ label svg {
    fill: var(--warning);
    stroke: var(--warning);
}

.rating-selector input:checked ~ label svg {
    fill: var(--warning);
    stroke: var(--warning);
}

/* =====================================================================
   Submit Button
   ===================================================================== */

.submit-button {
    background: var(--zando-blue);
    color: var(--bg-white);
    border: none;
    width: 100%;
    padding: 18px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.submit-button:hover:not(:disabled) {
    background: var(--zando-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
}

.submit-button:disabled {
    background: var(--text-light);
    cursor: not-allowed;
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--bg-white);
    border-radius: 50%;
    display: none;
    animation: spin 0.8s linear infinite;
}

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

.submit-button.loading .btn-text {
    display: none;
}

.submit-button.loading .loader {
    display: block;
}

/* =====================================================================
   Success State
   ===================================================================== */

.success-state {
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.success-icon {
    width: 70px;
    height: 70px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.success-icon svg {
    width: 35px;
    height: 35px;
}

.success-state h3 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.success-state p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 300px;
    margin-bottom: 25px;
}

.ticket-number {
    background: var(--success-light);
    color: var(--success);
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 25px;
}

.ghost-link {
    background: none;
    border: none;
    color: var(--zando-blue);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ghost-link:hover {
    color: var(--zando-blue-dark);
}

/* =====================================================================
   Policy Navigation
   ===================================================================== */

.policy-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 20px 40px;
    background: var(--bg-gray);
    border-bottom: 1px solid var(--border-light);
}

.policy-nav a {
    color: var(--text-medium);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: var(--border-radius);
    transition: all 0.2s;
}

.policy-nav a:hover {
    background: var(--zando-blue-pale);
    color: var(--zando-blue);
}

/* =====================================================================
   Policy Content
   ===================================================================== */

.policy-content {
    padding: 40px;
}

.policy-content section {
    margin-bottom: 35px;
}

.policy-content h2 {
    color: var(--text-dark);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--zando-blue-pale);
}

.policy-content h3 {
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 600;
    margin: 20px 0 10px 0;
}

.policy-content p {
    color: var(--text-medium);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 15px;
}

.policy-content ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 15px;
}

.policy-content li {
    color: var(--text-medium);
    font-size: 0.95rem;
    line-height: 1.8;
    padding-left: 24px;
    position: relative;
    margin-bottom: 8px;
}

.policy-content li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: var(--zando-blue);
    border-radius: 50%;
}

.policy-content strong {
    color: var(--text-dark);
}

.contact-info {
    background: var(--bg-gray);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-top: 15px;
}

.contact-info p {
    margin-bottom: 8px;
}

.contact-info a {
    color: var(--zando-blue);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* =====================================================================
   Footer
   ===================================================================== */

.page-footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* =====================================================================
   Responsive Styles
   ===================================================================== */

/* =====================================================================
   Typography - Poppins for headings, Open Sans for body
   ===================================================================== */

h1, h2, h3, h4, h5, h6,
.header-text h1,
.policy-header h1 {
    font-family: 'Poppins', sans-serif;
}

/* =====================================================================
   Responsive Styles
   ===================================================================== */

@media (max-width: 600px) {
    .master-wrapper {
        padding: 20px 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .support-header {
        flex-direction: column;
        text-align: center;
        padding: 30px;
    }

    .about-section {
        padding: 20px 25px;
    }

    .support-body,
    .policy-content {
        padding: 25px;
    }

    .type-selector {
        grid-template-columns: 1fr;
    }

    .policy-nav {
        padding: 15px;
    }

    .policy-header {
        padding: 35px 25px;
    }

    .policy-header h1 {
        font-size: 1.5rem;
    }
}

/* =====================================================================
   Dark Mode  (follows OS / browser preference)
   ===================================================================== */

@media (prefers-color-scheme: dark) {
    :root {
        /* Backgrounds */
        --bg-white:  #1A1A1A;
        --bg-light:  #121212;
        --bg-gray:   #222222;

        /* Text */
        --text-dark:   #F5F5F5;
        --text-medium: #BDBDBD;
        --text-muted:  #9E9E9E;
        --text-light:  #757575;

        /* Borders */
        --border-light:  #333333;
        --border-medium: #424242;

        /* Keep primary brand colours legible on dark backgrounds */
        --zando-primary:      #E0E0E0;
        --zando-primary-dark: #FFFFFF;
        --zando-primary-light:#BDBDBD;
        --zando-primary-pale: #2A2A2A;

        --zando-blue:      #E0E0E0;
        --zando-blue-dark: #FFFFFF;
        --zando-blue-light:#BDBDBD;
        --zando-blue-pale: #2A2A2A;

        /* Shadows — softer on dark backgrounds */
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
        --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.6);
    }

    body {
        background-color: var(--bg-light);
        color: var(--text-dark);
    }

    .support-card,
    .policy-card {
        background: var(--bg-white);
        border-color: var(--border-light);
    }

    .support-header,
    .policy-header {
        background: #000000;
    }

    .about-section {
        background: var(--bg-gray);
        border-color: var(--border-light);
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        background: var(--bg-gray);
        border-color: var(--border-medium);
        color: var(--text-dark);
    }

    .form-group input:focus,
    .form-group textarea:focus,
    .form-group select:focus {
        border-color: var(--zando-blue);
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
    }

    .form-group input::placeholder,
    .form-group textarea::placeholder {
        color: var(--text-light);
    }

    .type-card {
        background: var(--bg-gray);
        border-color: var(--border-medium);
    }

    .type-option input:checked + .type-card {
        background: var(--zando-blue-pale);
        border-color: var(--zando-blue);
    }

    .policy-nav {
        background: var(--bg-gray);
        border-color: var(--border-light);
    }

    .policy-nav a:hover {
        background: var(--zando-blue-pale);
    }

    .policy-content h2 {
        border-color: var(--border-medium);
    }

    .contact-info {
        background: var(--bg-gray);
    }

    .submit-button {
        background: #E0E0E0;
        color: #000000;
    }

    .submit-button:hover:not(:disabled) {
        background: #FFFFFF;
    }

    .submit-button:disabled {
        background: var(--border-medium);
        color: var(--text-muted);
    }
}
