/* ============================================================
   G6 Image Africa — Frontend Styles
   Colors: #F5A623 (orange) | #111 (black) | #fff (white)
   ============================================================ */

:root {
    --g6-orange:   #F5A623;
    --g6-orange-d: #d4881a;
    --g6-black:    #111111;
    --g6-dark:     #1a1a1a;
    --g6-gray:     #6b7280;
    --g6-light:    #f8f9fa;
    --g6-border:   #e5e7eb;
    --g6-white:    #ffffff;
    --g6-radius:   12px;
    --g6-shadow:   0 4px 24px rgba(0,0,0,0.08);
    --g6-trans:    0.25s ease;
}

/* ============================================================
   WRAPPER
   ============================================================ */
.g6-booking-wrapper {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    max-width: 780px;
    margin: 40px auto;
    padding: 0 16px;
    color: var(--g6-black);
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.g6-progress-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.g6-progress-bar::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--g6-border);
    z-index: 0;
}

.g6-progress-fill {
    position: absolute;
    top: 20px;
    left: 0;
    height: 2px;
    background: var(--g6-orange);
    z-index: 1;
    transition: width var(--g6-trans);
}

.g6-step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 2;
    cursor: default;
}

.g6-step-dot .g6-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--g6-white);
    border: 2px solid var(--g6-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--g6-gray);
    transition: all var(--g6-trans);
}

.g6-step-dot .g6-dot-label {
    font-size: 11px;
    color: var(--g6-gray);
    text-align: center;
    max-width: 70px;
    line-height: 1.3;
    font-weight: 500;
}

.g6-step-dot.active .g6-dot {
    background: var(--g6-orange);
    border-color: var(--g6-orange);
    color: var(--g6-white);
    box-shadow: 0 0 0 4px rgba(245,166,35,0.2);
}

.g6-step-dot.done .g6-dot {
    background: var(--g6-black);
    border-color: var(--g6-black);
    color: var(--g6-white);
}

.g6-step-dot.active .g6-dot-label,
.g6-step-dot.done .g6-dot-label {
    color: var(--g6-black);
    font-weight: 600;
}

/* ============================================================
   FORM CARD
   ============================================================ */
.g6-form-container {
    background: var(--g6-white);
    border-radius: var(--g6-radius);
    box-shadow: var(--g6-shadow);
    overflow: hidden;
}

.g6-form-header {
    background: var(--g6-black);
    padding: 28px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.g6-form-header h2 {
    color: var(--g6-white);
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.g6-form-header .g6-step-badge {
    background: var(--g6-orange);
    color: var(--g6-white);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

/* ============================================================
   STEPS
   ============================================================ */
.g6-step {
    display: none;
    padding: 36px;
    animation: g6FadeIn 0.3s ease;
}

.g6-step.active {
    display: block;
}

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

/* ============================================================
   FORM FIELDS
   ============================================================ */
.g6-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.g6-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.g6-field.full {
    grid-column: 1 / -1;
}

.g6-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--g6-black);
    letter-spacing: 0.3px;
}

.g6-field label .g6-required {
    color: var(--g6-orange);
    margin-left: 2px;
}

.g6-field input,
.g6-field select,
.g6-field textarea {
    border: 1.5px solid var(--g6-border);
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 14px;
    color: var(--g6-black);
    font-family: inherit;
    transition: border-color var(--g6-trans), box-shadow var(--g6-trans);
    background: var(--g6-white);
    width: 100%;
    box-sizing: border-box;
    outline: none;
}

.g6-field input:focus,
.g6-field select:focus,
.g6-field textarea:focus {
    border-color: var(--g6-orange);
    box-shadow: 0 0 0 3px rgba(245,166,35,0.15);
}

.g6-field input.g6-error,
.g6-field select.g6-error,
.g6-field textarea.g6-error {
    border-color: #e74c3c;
}

.g6-field .g6-field-error {
    font-size: 12px;
    color: #e74c3c;
    margin-top: 2px;
}

.g6-field textarea {
    min-height: 100px;
    resize: vertical;
}

/* ============================================================
   SERVICE CARDS (Step 3)
   ============================================================ */
.g6-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.g6-service-card {
    position: relative;
    border: 2px solid var(--g6-border);
    border-radius: 10px;
    padding: 18px 14px 14px;
    cursor: pointer;
    transition: all var(--g6-trans);
    text-align: center;
}

.g6-service-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.g6-service-card:hover {
    border-color: var(--g6-orange);
    box-shadow: 0 4px 16px rgba(245,166,35,0.12);
    transform: translateY(-2px);
}

.g6-service-card.selected {
    border-color: var(--g6-orange);
    background: rgba(245,166,35,0.06);
}

.g6-service-card.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 10px;
    width: 20px;
    height: 20px;
    background: var(--g6-orange);
    color: var(--g6-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
}

.g6-service-icon {
    font-size: 28px;
    margin-bottom: 10px;
    display: block;
}

.g6-service-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--g6-black);
    margin-bottom: 4px;
}

.g6-service-hint {
    font-size: 11px;
    color: var(--g6-gray);
    line-height: 1.4;
}

/* ============================================================
   FILE UPLOAD / DROPZONE
   ============================================================ */
.g6-dropzone {
    border: 2px dashed var(--g6-border);
    border-radius: var(--g6-radius);
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--g6-trans);
    background: var(--g6-light);
}

.g6-dropzone:hover,
.g6-dropzone.dragover {
    border-color: var(--g6-orange);
    background: rgba(245,166,35,0.04);
}

.g6-dropzone-icon {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
}

.g6-dropzone p {
    font-size: 14px;
    color: var(--g6-gray);
    margin: 0 0 6px;
}

.g6-dropzone strong {
    color: var(--g6-orange);
}

.g6-dropzone small {
    font-size: 12px;
    color: var(--g6-gray);
}

#g6FileInput {
    display: none;
}

.g6-file-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.g6-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--g6-light);
    border: 1px solid var(--g6-border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
}

.g6-file-item .g6-file-name {
    flex: 1;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.g6-file-item .g6-file-size {
    color: var(--g6-gray);
    font-size: 12px;
}

.g6-file-item .g6-file-remove {
    cursor: pointer;
    color: #e74c3c;
    font-size: 16px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity var(--g6-trans);
}

.g6-file-item .g6-file-remove:hover { opacity: 1; }

/* ============================================================
   REVIEW SUMMARY (Step 5)
   ============================================================ */
.g6-summary {
    background: var(--g6-light);
    border-radius: var(--g6-radius);
    padding: 24px;
    margin-bottom: 20px;
}

.g6-summary-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--g6-border);
}

.g6-summary-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.g6-summary-section h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--g6-orange);
    margin: 0 0 12px;
    font-weight: 700;
}

.g6-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding: 4px 0;
}

.g6-summary-row .label { color: var(--g6-gray); }
.g6-summary-row .value { font-weight: 600; }

.g6-service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.g6-service-tag {
    background: var(--g6-black);
    color: var(--g6-white);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}

/* ============================================================
   TERMS
   ============================================================ */
.g6-terms-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px;
    background: rgba(245,166,35,0.06);
    border: 1px solid rgba(245,166,35,0.3);
    border-radius: 8px;
    margin-bottom: 20px;
}

.g6-terms-row input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    accent-color: var(--g6-orange);
    flex-shrink: 0;
}

.g6-checkbox-label {
    font-size: 13px;
    line-height: 1.5;
    color: var(--g6-black);
}

.g6-checkbox-label a {
    color: var(--g6-orange);
    text-decoration: none;
    font-weight: 600;
}

/* ============================================================
   NAVIGATION BUTTONS
   ============================================================ */
.g6-form-nav {
    padding: 24px 36px;
    border-top: 1px solid var(--g6-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--g6-light);
}

.g6-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all var(--g6-trans);
    text-decoration: none;
    font-family: inherit;
    letter-spacing: 0.2px;
}

.g6-btn-primary {
    background: var(--g6-orange);
    color: var(--g6-white);
}

.g6-btn-primary:hover {
    background: var(--g6-orange-d);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245,166,35,0.35);
}

.g6-btn-back {
    background: transparent;
    color: var(--g6-gray);
    border: 1.5px solid var(--g6-border);
}

.g6-btn-back:hover {
    background: var(--g6-white);
    border-color: var(--g6-black);
    color: var(--g6-black);
}

.g6-btn-submit {
    background: var(--g6-black);
    color: var(--g6-white);
    padding: 15px 36px;
    font-size: 16px;
}

.g6-btn-submit:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.g6-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ============================================================
   SUCCESS STATE
   ============================================================ */
.g6-success-box {
    text-align: center;
    padding: 60px 36px;
}

.g6-success-icon {
    width: 80px;
    height: 80px;
    background: var(--g6-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 36px;
    color: var(--g6-white);
}

.g6-success-box h2 {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 12px;
}

.g6-success-box p {
    font-size: 15px;
    color: var(--g6-gray);
    max-width: 480px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

.g6-ref-box {
    display: inline-block;
    background: var(--g6-light);
    border: 1.5px solid var(--g6-border);
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 700;
    color: var(--g6-black);
    margin-bottom: 28px;
    letter-spacing: 1px;
}

.g6-wa-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    color: var(--g6-white);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: all var(--g6-trans);
}

.g6-wa-link:hover {
    background: #1da550;
    transform: translateY(-1px);
}

/* ============================================================
   CLIENT PORTAL
   ============================================================ */
.g6-portal {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 16px;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}

.g6-portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    border-bottom: 2px solid var(--g6-border);
    margin-bottom: 32px;
}

.g6-portal-header h2 {
    font-size: 22px;
    font-weight: 800;
    margin: 0;
}

.g6-portal-email {
    font-size: 13px;
    color: var(--g6-gray);
    background: var(--g6-light);
    padding: 6px 14px;
    border-radius: 20px;
}

.g6-portal-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--g6-border);
    margin-bottom: 24px;
}

.g6-portal-tab {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--g6-gray);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--g6-trans);
}

.g6-portal-tab.active {
    color: var(--g6-orange);
    border-bottom-color: var(--g6-orange);
}

.g6-portal-tab-content {
    display: none;
}

.g6-portal-tab-content.active {
    display: block;
}

.g6-portal-search {
    background: var(--g6-light);
    border-radius: var(--g6-radius);
    padding: 40px;
    text-align: center;
}

.g6-portal-search h3 {
    font-size: 20px;
    margin: 0 0 8px;
}

.g6-portal-search p {
    color: var(--g6-gray);
    margin: 0 0 24px;
}

.g6-portal-search .g6-search-row {
    display: flex;
    gap: 12px;
    max-width: 420px;
    margin: 0 auto;
}

.g6-portal-search input {
    flex: 1;
    padding: 12px 16px;
    border: 1.5px solid var(--g6-border);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

.g6-portal-search input:focus {
    border-color: var(--g6-orange);
    box-shadow: 0 0 0 3px rgba(245,166,35,0.15);
}

/* ============================================================
   PROJECT TRACKER
   ============================================================ */
.g6-tracker {
    max-width: 700px;
    margin: 40px auto;
    padding: 0 16px;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}

.g6-tracker-search {
    background: var(--g6-white);
    border-radius: var(--g6-radius);
    box-shadow: var(--g6-shadow);
    padding: 40px;
    text-align: center;
    margin-bottom: 32px;
}

.g6-tracker-search h3 {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 8px;
}

.g6-tracker-search p {
    color: var(--g6-gray);
    font-size: 14px;
    margin: 0 0 24px;
}

.g6-tracker-result {
    background: var(--g6-white);
    border-radius: var(--g6-radius);
    box-shadow: var(--g6-shadow);
    overflow: hidden;
}

.g6-tracker-result-header {
    background: var(--g6-black);
    padding: 24px 32px;
    color: var(--g6-white);
}

.g6-tracker-result-header h3 {
    margin: 0 0 4px;
    font-size: 18px;
}

.g6-tracker-result-header p {
    margin: 0;
    font-size: 13px;
    opacity: 0.7;
}

.g6-pipeline {
    padding: 32px;
}

.g6-pipeline-step {
    display: flex;
    gap: 16px;
    margin-bottom: 0;
    position: relative;
}

.g6-pipeline-step:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 40px;
    bottom: -8px;
    width: 2px;
    background: var(--g6-border);
    z-index: 0;
}

.g6-pipeline-step.done::before { background: var(--g6-orange); }

.g6-pipeline-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--g6-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    z-index: 1;
    position: relative;
    margin-top: 4px;
}

.g6-pipeline-step.done .g6-pipeline-icon   { background: var(--g6-orange); color: var(--g6-white); }
.g6-pipeline-step.active .g6-pipeline-icon { background: var(--g6-black); color: var(--g6-white); box-shadow: 0 0 0 4px rgba(17,17,17,0.1); }

.g6-pipeline-content {
    padding-bottom: 24px;
    flex: 1;
}

.g6-pipeline-content h4 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 3px;
}

.g6-pipeline-content p {
    font-size: 13px;
    color: var(--g6-gray);
    margin: 0;
}

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.g6-loading {
    text-align: center;
    padding: 40px;
    color: var(--g6-gray);
    font-size: 14px;
}

.g6-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--g6-border);
    border-top-color: var(--g6-orange);
    border-radius: 50%;
    animation: g6Spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

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

/* ============================================================
   WHATSAPP FLOAT (shared with class-whatsapp.php inline)
   ============================================================ */
.g6-whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    width: 58px;
    height: 58px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37,211,102,0.45);
    transition: all var(--g6-trans);
}

.g6-whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(37,211,102,0.55);
}

.g6-whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: #fff;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
    .g6-booking-wrapper,
    .g6-tracker,
    .g6-portal {
        padding: 0 12px;
        margin: 20px auto;
    }

    .g6-form-header,
    .g6-step {
        padding: 24px 20px;
    }

    .g6-form-nav {
        padding: 20px;
        flex-direction: column;
        gap: 10px;
    }

    .g6-btn { width: 100%; justify-content: center; }

    .g6-fields-grid {
        grid-template-columns: 1fr;
    }

    .g6-services-grid {
        grid-template-columns: 1fr 1fr;
    }

    .g6-progress-bar {
        gap: 4px;
        margin-bottom: 28px;
    }

    .g6-step-dot .g6-dot-label {
        display: none;
    }

    .g6-step-dot .g6-dot {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .g6-portal-search .g6-search-row {
        flex-direction: column;
    }

    .g6-tracker-search { padding: 28px 20px; }
    .g6-pipeline { padding: 20px; }
}

@media (max-width: 420px) {
    .g6-services-grid {
        grid-template-columns: 1fr;
    }
}
