/* ========================================
   NH Dakwerken - Form Stylesheet
   ======================================== */

:root {
    --nh-green: #88B828;
    --nh-green-light: #9ACC2C;
    --nh-green-pale: rgba(136, 184, 40, 0.15);
    --nh-green-dark: #6A9020;
    --nh-black: #0D0D0D;
    --nh-dark: #1A1A1A;
    --nh-dark-medium: #252525;
    --nh-gray: #404040;
    --nh-gray-light: #888888;
    --nh-border: #E5E5E5;
    --nh-bg: #F0F0F0;
    --nh-bg-light: #F8F8F8;
    --nh-white: #FFFFFF;
    --nh-error: #DC3545;
    --nh-error-bg: #FEF2F2;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --transition: 0.2s ease;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--nh-bg);
    color: var(--nh-gray);
    line-height: 1.6;
    min-height: 100vh;
    padding: 24px;
}

/* ========== LAYOUT ========== */
.form-page-container {
    display: grid;
    grid-template-columns: 460px 1fr;
    min-height: calc(100vh - 48px);
    max-width: 1400px;
    margin: 0 auto;
    background: var(--nh-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Info Side - Fixed left column */
.info-side {
    width: 460px;
    padding: 48px 40px;
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, var(--nh-dark) 0%, var(--nh-black) 100%);
    color: var(--nh-white);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
    order: -1;
}

/* Form Side - Flexible right column */
.form-side {
    padding: 48px 60px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-content {
    max-width: 520px;
    width: 100%;
}

/* ========== INFO PANEL CONTENT ========== */
.info-logo {
    margin-bottom: 48px;
}

.info-logo img {
    height: 52px;
    width: auto;
}

.info-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(136, 184, 40, 0.2);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--nh-green-light);
    width: fit-content;
}

.info-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--nh-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.info-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
    color: var(--nh-white);
}

.info-subtitle {
    font-size: 1rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 40px;
    line-height: 1.7;
}

.info-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.info-feature {
    display: flex;
    align-items: center;
    gap: 16px;
}

.feature-icon {
    width: 44px;
    height: 44px;
    background: rgba(136, 184, 40, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--nh-green);
    fill: none;
    stroke-width: 2;
}

.feature-text strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--nh-white);
    margin-bottom: 2px;
}

.feature-text span {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

/* Testimonial */
.testimonial {
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid rgba(255,255,255,0.08);
}

.testimonial-stars {
    color: #F5B800;
    font-size: 1rem;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.testimonial-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.9);
    font-style: italic;
    margin-bottom: 16px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    background: var(--nh-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--nh-white);
}

.author-info strong {
    display: block;
    font-size: 0.9rem;
    color: var(--nh-white);
}

.author-info span {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

/* ========== FORM CONTENT ========== */

/* Progress Section */
.progress-section {
    margin-bottom: 40px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-label {
    font-size: 0.85rem;
    color: var(--nh-gray-light);
    font-weight: 500;
}

.progress-percent {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--nh-green);
}

.progress-bar {
    height: 6px;
    background: var(--nh-border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 28px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--nh-green) 0%, var(--nh-green-light) 100%);
    border-radius: 10px;
    width: 0%;
    transition: width 0.4s ease;
}

/* Step Indicators */
.step-indicators {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.step-indicators::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 60px;
    right: 60px;
    height: 2px;
    background: var(--nh-border);
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--nh-white);
    border: 2px solid var(--nh-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.step-circle svg {
    width: 20px;
    height: 20px;
    stroke: var(--nh-gray-light);
    stroke-width: 2;
    fill: none;
}

.step-circle .check-icon {
    display: none;
}

.step-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--nh-gray-light);
}

/* Step States */
.step-indicator.active .step-circle {
    border-color: var(--nh-green);
    background: var(--nh-dark);
}

.step-indicator.active .step-circle svg {
    stroke: var(--nh-green);
}

.step-indicator.active .step-name {
    color: var(--nh-green);
    font-weight: 600;
}

.step-indicator.completed .step-circle {
    border-color: var(--nh-green);
    background: var(--nh-green);
}

.step-indicator.completed .step-circle .step-icon {
    display: none;
}

.step-indicator.completed .step-circle .check-icon {
    display: block;
    stroke: white;
}

.step-indicator.completed .step-name {
    color: var(--nh-green);
}

/* ========== FORM STEPS ========== */
.form-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

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

.step-header {
    margin-bottom: 32px;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--nh-black);
    margin-bottom: 8px;
}

.step-subtitle {
    font-size: 1rem;
    color: var(--nh-gray-light);
}

/* Form Fields */
.form-fields {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.form-row-postcode {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 16px;
}

.field-group label {
    display: block;
    margin-bottom: 8px;
}

.field-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--nh-black);
}

.field-required {
    color: var(--nh-error);
    margin-left: 2px;
}

.field-optional {
    font-weight: 400;
    color: var(--nh-gray-light);
    font-size: 0.8rem;
    margin-left: 6px;
}

.input-wrap {
    position: relative;
}

.input-wrap .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--nh-gray-light);
    pointer-events: none;
}

.input-wrap .input-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.input-wrap input {
    padding-left: 48px;
}

input, textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid var(--nh-border);
    border-radius: var(--radius);
    background: var(--nh-white);
    color: var(--nh-black);
    transition: var(--transition);
}

input:hover, textarea:hover {
    border-color: #CCC;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--nh-green);
    box-shadow: 0 0 0 3px var(--nh-green-pale);
}

input.error, textarea.error {
    border-color: var(--nh-error);
    background: var(--nh-error-bg);
}

input.valid {
    border-color: var(--nh-green);
}

input::placeholder, textarea::placeholder {
    color: #AAA;
}

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

.field-hint {
    font-size: 0.8rem;
    color: var(--nh-gray-light);
    margin-top: 6px;
}

.field-error {
    display: none;
    font-size: 0.8rem;
    color: var(--nh-error);
    margin-top: 6px;
}

.field-group.has-error .field-error {
    display: block;
}

/* Address Loading */
.address-status {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--nh-green-pale);
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: var(--nh-green-dark);
}

.address-status.visible {
    display: flex;
}

.address-status .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--nh-green-pale);
    border-top-color: var(--nh-green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* File Upload */
.upload-area {
    border: 2px dashed var(--nh-border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--nh-bg-light);
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--nh-green);
    background: var(--nh-green-pale);
}

.upload-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
    color: var(--nh-gray-light);
}

.upload-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
}

.upload-area:hover .upload-icon {
    color: var(--nh-green);
}

.upload-text {
    font-size: 0.95rem;
    color: var(--nh-gray);
}

.upload-text span {
    color: var(--nh-green);
    font-weight: 600;
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--nh-gray-light);
    margin-top: 4px;
}

.file-input {
    display: none;
}

.file-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.file-preview-item {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--nh-border);
}

.file-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: var(--nh-error);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ========== FORM ACTIONS ========== */
.form-actions {
    margin-top: 36px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.btn-primary {
    background: var(--nh-green);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--nh-green-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Trust Message */
.trust-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--nh-gray-light);
}

.trust-message svg {
    width: 16px;
    height: 16px;
    stroke: var(--nh-gray-light);
    stroke-width: 2;
    fill: none;
}

/* ========== SUCCESS SCREEN ========== */
.success-content {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--nh-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    animation: scaleIn 0.5s ease;
}

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

.success-icon svg {
    width: 40px;
    height: 40px;
    stroke: white;
    stroke-width: 3;
    fill: none;
}

.success-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--nh-black);
    margin-bottom: 8px;
}

.success-text {
    font-size: 1rem;
    color: var(--nh-gray);
    margin-bottom: 32px;
}

.next-steps-box {
    background: var(--nh-bg-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: left;
}

.next-steps-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--nh-black);
    margin-bottom: 20px;
}

.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.timeline-icon {
    font-size: 1.3rem;
}

.timeline-item strong {
    display: block;
    font-size: 0.9rem;
    color: var(--nh-black);
}

.timeline-item p {
    font-size: 0.85rem;
    color: var(--nh-gray-light);
    margin: 0;
}

/* ========== CONFETTI ========== */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    body {
        padding: 0;
    }

    .form-page-container {
        display: flex;
        flex-direction: column;
        border-radius: 0;
        min-height: 100vh;
    }

    .form-side {
        padding: 40px 24px;
        order: 2;
    }

    .form-content {
        max-width: 100%;
    }

    .info-side {
        order: -1;
        width: 100%;
        height: auto;
        position: relative;
        padding: 40px 24px;
        border-radius: 0;
    }

    .info-logo {
        margin-bottom: 24px;
    }

    .info-main {
        justify-content: flex-start;
    }

    .info-title {
        font-size: 1.4rem;
    }

    .info-subtitle {
        margin-bottom: 24px;
    }

    .info-features {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        margin-bottom: 24px;
    }

    .info-feature {
        min-width: 0;
    }

    .info-feature:last-child {
        grid-column: span 2;
    }

    .feature-text span {
        display: none;
    }
}

@media (max-width: 600px) {
    .form-side {
        padding: 32px 20px;
    }

    .info-side {
        padding: 32px 20px;
    }

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

    .form-row-postcode {
        grid-template-columns: 1fr 100px;
    }

    .step-indicators::before {
        left: 40px;
        right: 40px;
    }

    .step-title {
        font-size: 1.3rem;
    }

    .info-features {
        grid-template-columns: 1fr 1fr;
    }

    .feature-icon {
        width: 36px;
        height: 36px;
    }

    .feature-icon svg {
        width: 18px;
        height: 18px;
    }

    .feature-text strong {
        font-size: 0.85rem;
    }

    .feature-text span {
        display: none;
    }
}

/* Large Desktop */
@media (min-width: 1400px) {
    body {
        padding: 40px;
    }

    .form-side {
        padding: 60px 80px 60px;
    }
}
