/* Zon in je Tuin — Wizard UI */

:root {
    --primary-yellow: #FFCA28;
    --primary-yellow-hover: #e6b523;
    --primary-gray: #6B6B6B;
    --text-dark: #333333;
    --bg-light: #F9F9F9;
    --border-color: #ddd;
    --success-green: #4CAF50;
    --error-red: #E53935;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background: var(--bg-light);
}

/* Header */
header {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 12px 5%;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo img { height: 50px; }

.header-title {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-gray);
}

/* Wizard container */
.wizard-container {
    max-width: 720px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Progress bar */
.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    gap: 0;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: default;
}

.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.95em;
    background: #ddd;
    color: #999;
    transition: all 0.3s;
}

.step-indicator.active .step-num {
    background: var(--primary-yellow);
    color: var(--text-dark);
}

.step-indicator.completed .step-num {
    background: var(--success-green);
    color: white;
}

.step-label {
    font-size: 0.75em;
    color: #999;
}

.step-indicator.active .step-label {
    color: var(--text-dark);
    font-weight: 600;
}

.step-indicator.completed .step-label {
    color: var(--success-green);
}

.step-connector {
    width: 48px;
    height: 2px;
    background: #ddd;
    margin: 0 4px;
    margin-bottom: 18px;
}

/* Wizard steps */
.wizard-step {
    display: none;
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

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

.wizard-step h2 {
    color: var(--primary-gray);
    margin-bottom: 8px;
    font-size: 1.4em;
}

.wizard-step > p {
    color: #777;
    margin-bottom: 24px;
}

/* Address search */
.address-search { position: relative; }

#address-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1em;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
}

#address-input:focus { border-color: var(--primary-yellow); }

.suggestions-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 50;
    max-height: 280px;
    overflow-y: auto;
}

.suggestions-dropdown.visible { display: block; }

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95em;
}

.suggestion-item:hover { background: #FFF8E1; }
.suggestion-item:last-child { border-bottom: none; }

/* Address result */
.address-result { margin-top: 20px; }
.address-result.hidden { display: none; }

.result-card {
    background: #FFFDE7;
    border: 1px solid #FFF176;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.result-card strong {
    color: var(--text-dark);
    display: block;
    overflow-wrap: break-word;
}
.result-card p {
    color: #777;
    margin-top: 4px;
    font-size: 0.9em;
    overflow-wrap: break-word;
}

/* Map */
#map-container {
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

#parcel-map {
    height: 400px;
    width: 100%;
    z-index: 1;
}

.parcel-info.hidden { display: none; }

.parcel-info {
    margin-bottom: 16px;
}

/* Buttons */
.btn {
    background: var(--primary-yellow);
    color: var(--text-dark);
    padding: 12px 28px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn:hover { background: var(--primary-yellow-hover); }

.btn-secondary {
    background: white;
    color: var(--primary-gray);
    padding: 12px 28px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn-secondary:hover {
    border-color: var(--primary-gray);
    color: var(--text-dark);
}

.step-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
}

/* Form inputs */
.form-group {
    margin-bottom: 24px;
}

.form-group > label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-gray);
}

.toggle-group {
    display: flex;
    gap: 0;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
}

.toggle-btn {
    padding: 10px 24px;
    border: none;
    background: white;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    color: var(--primary-gray);
    transition: all 0.2s;
}

.toggle-btn.active {
    background: var(--primary-yellow);
    color: var(--text-dark);
    font-weight: 600;
}

.toggle-btn:not(:last-child) {
    border-right: 1px solid var(--border-color);
}

.checkbox-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95em;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-yellow);
}

input[type="number"] {
    padding: 10px 14px;
    font-size: 1em;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    width: 120px;
}

input[type="number"]:focus { border-color: var(--primary-yellow); }

/* Processing / Status */
.processing-container {
    text-align: center;
    padding: 32px 0;
}

.processing-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #eee;
    border-top-color: var(--primary-yellow);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

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

.processing-progress {
    width: 100%;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    margin: 16px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-yellow);
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease;
}

.processing-step {
    color: #999;
    font-size: 0.9em;
}

.close-notice {
    margin-top: 24px;
    padding: 16px 20px;
    background: #FFFDE7;
    border: 1px solid #FFF176;
    border-radius: 8px;
    color: var(--text-dark);
    font-size: 0.95em;
    line-height: 1.6;
}

.close-notice p {
    margin: 0;
}

.close-notice p:first-child {
    font-weight: 600;
}

/* Completed / confirmation section */
.completed-section,
.confirmation-section {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-align: center;
}

.completed-section p,
.confirmation-section p {
    color: #555;
    margin-bottom: 12px;
}

.completed-section .close-notice,
.confirmation-section .close-notice {
    margin-top: 16px;
}

.check-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--success-green);
    margin: 0 auto 20px;
    position: relative;
}

.check-icon::after {
    content: '';
    position: absolute;
    left: 20px;
    top: 14px;
    width: 14px;
    height: 24px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

/* Status page */
.status-container {
    max-width: 600px;
    margin: 60px auto;
    padding: 0 20px;
    text-align: center;
}

.status-container h2 {
    color: var(--primary-gray);
    margin-bottom: 20px;
}

.hidden { display: none !important; }

/* Download section */
.download-section {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.download-section p {
    color: #777;
    margin-bottom: 20px;
}

.download-btn {
    display: block;
    margin: 10px auto;
    max-width: 400px;
}

/* Error section */
.error-section {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.error-text {
    color: var(--error-red);
    margin: 16px 0;
    font-style: italic;
}

.field-hint {
    font-size: 0.9em;
    color: var(--primary-gray);
    margin-bottom: 6px;
}

#token-input,
#email-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1em;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
}

#token-input:focus,
#email-input:focus {
    border-color: var(--primary-yellow);
}

.email-sent {
    color: var(--success-green);
    font-weight: 500;
}

/* Map loading overlay */
.map-loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: inherit;
    gap: 12px;
}

.map-loading.hidden {
    display: none;
}

.map-loading p {
    margin: 0;
    color: #555;
    font-size: 0.9rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #1565C0;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Responsive */
@media (max-width: 600px) {
    .wizard-container { margin: 16px auto; }
    .wizard-step { padding: 20px; }
    header { padding: 10px 3%; }
    .step-connector { width: 24px; }
    .step-label { font-size: 0.65em; }
    .step-buttons { flex-direction: column-reverse; gap: 10px; }
    .btn, .btn-secondary { width: 100%; }
    #parcel-map { height: 300px; }
}
