/* ========================================
   FOTOSHOOT BOEKINGSPAGINA
   Huisstijl: portretcoach.nl
   ======================================== */
:root {
    --primary: #34535b;
    --accent: #dbb458;
    --accent-light: #e8d49a;
    --bg: #f5f0ea;
    --card: #ffffff;
    --text: #2c2c2c;
    --text-light: #6b6b6b;
    --border: #e0d8cf;
    --radius: 10px;
    --success: #7a9e7e;
    --success-light: #e4ede5;
    --warning: #dbb458;
    --warning-light: #f5ecd0;
    --danger: #9f5958;
    --danger-light: #f0e0df;
    --font-heading: 'Palatino Linotype', 'Book Antiqua', Palatino, 'Georgia', serif;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.page {
    max-width: 640px;
    margin: 0 auto;
    padding: 1rem;
}

/* Header */
header {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

header h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 0.25rem;
}

header .subtitle {
    color: var(--accent);
    font-size: 1rem;
}

/* Steps */
.step {
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.step h2 {
    font-family: var(--font-heading);
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.step-info {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.hidden { display: none !important; }

/* Calendar */
.agenda-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.agenda-controls span {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--primary);
    min-width: 160px;
    text-align: center;
}

.btn-nav {
    background: var(--primary);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
}

.btn-nav:hover { opacity: 0.85; }

.calendar-header-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 4px;
}

.calendar-header-cell {
    text-align: center;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-light);
    padding: 0.3rem 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.9rem;
    position: relative;
    background: var(--bg);
    color: var(--text-light);
}

.cal-day.available {
    background: var(--warning-light);
    border: 2px solid var(--warning);
    color: var(--text);
    cursor: pointer;
    font-weight: 600;
}

.cal-day.available:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.05);
    transition: all 0.15s;
}

.cal-day.unavailable {
    background: var(--bg);
    color: var(--text-light);
    opacity: 0.5;
}

.cal-day.past {
    opacity: 0.3;
}

.cal-day.today {
    box-shadow: 0 0 0 2px var(--accent);
}

.cal-day.outside {
    opacity: 0.2;
}

.calendar-legend {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 4px;
    vertical-align: middle;
}

.legend-dot.available {
    background: var(--warning-light);
    border: 2px solid var(--warning);
}

.legend-dot.unavailable {
    background: var(--bg);
    border: 1px solid var(--border);
}

/* Time Slots */
.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.time-slot {
    background: var(--warning-light);
    border: 2px solid var(--warning);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
}

.time-slot-compact {
    padding: 0.6rem 0.5rem;
}

.time-slot:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.03);
}

.time-slot .time-range {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.time-slot-compact .time-range {
    font-size: 1rem;
}

/* Form */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

form label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-light);
}

form input,
form select,
form textarea {
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

form input:focus,
form select:focus,
form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(219, 180, 88, 0.2);
}

.duration-label {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Buttons */
.btn-primary {
    background: var(--accent);
    color: var(--primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

.btn-primary:hover { opacity: 0.9; }

.btn-back {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 0;
}

.btn-back:hover { color: var(--primary); }

/* Confirmation */
.confirmation-box {
    text-align: center;
    padding: 2rem 1rem;
}

.confirmation-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--success);
    color: white;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.confirmation-date {
    font-size: 1.2rem;
    margin: 0.75rem 0;
}

.confirmation-detail {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    font-size: 0.9rem;
    z-index: 200;
    animation: toastIn 0.3s;
}

.toast-error { background: var(--danger); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Booking Code Box (bevestigingsscherm) */
.booking-code-box {
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    margin: 1rem auto;
    display: inline-block;
}

.code-label {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.code-value {
    font-size: 1.6rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

/* Lookup link under calendar */
.lookup-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Reschedule banner */
.reschedule-banner {
    background: var(--warning-light);
    border: 1px solid var(--warning);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 1rem;
}

/* Booking detail card (lookup result) */
.booking-detail-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 1rem;
}

.booking-detail-card h3 {
    font-family: var(--font-heading);
    color: var(--primary);
    margin-bottom: 1rem;
}

.booking-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.booking-detail-row .label {
    color: var(--text-light);
    font-size: 0.85rem;
}

.booking-code-display {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    letter-spacing: 1px;
    background: var(--primary);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.booking-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.booking-actions .btn-primary {
    flex: 1;
}

.btn-cancel {
    flex: 1;
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-cancel:hover { opacity: 0.9; }

/* Cancelled card */
.booking-detail-card.cancelled {
    text-align: center;
}

.cancel-icon {
    background: var(--danger) !important;
}

/* Footer */
footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-light);
    font-size: 0.8rem;
}

/* ========================================
   ADMIN STYLES
   ======================================== */
.error-text {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: -0.5rem;
}

.admin-link-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-link-box a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
}

.btn-small {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
}

.btn-small:hover { opacity: 0.85; }

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
}

.btn-danger:hover { opacity: 0.85; }

.admin-add-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.admin-add-form label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-light);
}

.admin-add-form input {
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.admin-add-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(219, 180, 88, 0.2);
}

.admin-add-form .btn-primary {
    grid-column: 1 / -1;
}

.admin-empty {
    color: var(--text-light);
    font-size: 0.9rem;
    padding: 1rem 0;
}

.admin-day-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.admin-day-card.past { opacity: 0.5; }

.admin-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.admin-day-header h4 {
    font-family: var(--font-heading);
    color: var(--primary);
    font-size: 1rem;
}

.admin-day-actions {
    display: flex;
    gap: 0.4rem;
}

.past-label {
    color: var(--text-light);
    font-size: 0.8rem;
    font-style: italic;
}

.admin-time-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.admin-availability {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0 0 0.5rem;
}

.admin-chip {
    background: var(--warning-light);
    border: 1px solid var(--warning);
    border-radius: 6px;
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.admin-chip.booked {
    background: var(--danger-light);
    border-color: var(--danger);
    color: var(--danger);
}

.admin-booking {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.admin-booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-booking-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-booking-code {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.8rem;
    background: var(--primary);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 1px;
}

.admin-booking-details {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

.toast-success { background: var(--success); }

/* Responsive */
@media (max-width: 480px) {
    .page { padding: 0.5rem; }
    header { padding: 1.5rem 1rem; }
    header h1 { font-size: 1.4rem; }
    .step { padding: 1rem; }
    .time-slots-grid { grid-template-columns: repeat(3, 1fr); }
    .admin-add-form { grid-template-columns: 1fr; }
}

/* ========================================
   LOADING OVERLAY
   ======================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(245, 240, 234, 0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    gap: 1rem;
}

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

.loading-overlay p {
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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