/* ============================================================
   Wedding Reservations — Calendar Styles
   ============================================================ */

/* Wrapper */
.wr-calendar-wrapper {
    font-family: inherit;
    max-width: 700px;
    margin: 0 auto;
}

/* ── Legend ──────────────────────────────────────────────── */
.wr-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    font-size: 14px;
}

.wr-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wr-legend-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.wr-legend-dot--option    { background: #3B82F6; }
.wr-legend-dot--pending   { background: #F97316; }
.wr-legend-dot--confirmed { background: #EF4444; }

/* ── Calendar header ─────────────────────────────────────── */
.wr-calendar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.wr-calendar__title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.wr-calendar__nav {
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 12px;
    line-height: 1.5;
    transition: background 0.15s;
}

.wr-calendar__nav:hover {
    background: #f5f5f5;
}

.wr-calendar__nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ── Day-of-week labels ──────────────────────────────────── */
.wr-calendar__weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 4px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Days grid ───────────────────────────────────────────── */
.wr-calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

/* Base day cell */
.wr-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.1s, box-shadow 0.1s, opacity 0.1s;
    user-select: none;
}

/* Empty filler cell (start of month) */
.wr-day--empty {
    cursor: default;
    pointer-events: none;
}

/* Available */
.wr-day--available {
    background: #f9fafb;
    color: #111;
}

.wr-day--available:hover {
    background: #e5e7eb;
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Past dates */
.wr-day--past {
    background: #f3f4f6;
    color: #bbb;
    cursor: not-allowed;
    pointer-events: none;
}

/* Option — Blauw */
.wr-day--option {
    background: #3B82F6;
    color: #fff;
    cursor: not-allowed;
}

.wr-day--option:hover {
    opacity: 0.85;
}

/* Pending (aanbetaald) — Oranje */
.wr-day--pending {
    background: #F97316;
    color: #fff;
    cursor: not-allowed;
}

.wr-day--pending:hover {
    opacity: 0.85;
}

/* Confirmed (geboekt) — Rood */
.wr-day--confirmed {
    background: #EF4444;
    color: #fff;
    cursor: not-allowed;
}

.wr-day--confirmed:hover {
    opacity: 0.85;
}

/* Today highlight */
.wr-day--today {
    border-color: #6366f1;
}

/* Loading state */
.wr-calendar--loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ── Modal ───────────────────────────────────────────────── */
.wr-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}

.wr-modal.wr-modal--open {
    display: flex;
}

.wr-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
}

.wr-modal__content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    width: min(560px, 92vw);
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    animation: wr-fadeIn 0.2s ease;
}

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

.wr-modal__close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #888;
    line-height: 1;
    padding: 4px;
}

.wr-modal__close:hover {
    color: #111;
}

/* ── Form inside modal ───────────────────────────────────── */
.wr-form__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 6px;
}

.wr-form__date {
    font-size: 15px;
    color: #666;
    margin-bottom: 24px;
}

/* Mode toggle */
.wr-form__tabs {
    display: flex;
    gap: 0;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 24px;
}

.wr-form__tab {
    flex: 1;
    padding: 10px 8px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    transition: background 0.15s, color 0.15s;
    color: #555;
}

.wr-form__tab--active {
    background: #111;
    color: #fff;
}

.wr-form__tab:first-child { border-radius: 9px 0 0 9px; }
.wr-form__tab:last-child  { border-radius: 0 9px 9px 0; }

/* Fields */
.wr-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.wr-form__field {
    margin-bottom: 14px;
}

.wr-form__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.wr-form__input,
.wr-form__textarea,
.wr-form__select {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #111;
    background: #fafafa;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.wr-form__input:focus,
.wr-form__textarea:focus,
.wr-form__select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
    background: #fff;
}

.wr-form__textarea {
    min-height: 90px;
    resize: vertical;
}

/* Submit button */
.wr-form__submit {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 6px;
    transition: opacity 0.15s, transform 0.1s;
}

.wr-form__submit:hover:not(:disabled) {
    opacity: 0.88;
    transform: translateY(-1px);
}

.wr-form__submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wr-form__submit--option {
    background: #3B82F6;
    color: #fff;
}

.wr-form__submit--payment {
    background: #F97316;
    color: #fff;
}

/* Info box */
.wr-form__info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #0369a1;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Success / error messages */
.wr-message {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    margin-top: 16px;
    line-height: 1.5;
}

.wr-message--success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

.wr-message--error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
    .wr-modal__content {
        padding: 24px 18px;
    }

    .wr-form__row {
        grid-template-columns: 1fr;
    }

    .wr-day {
        font-size: 12px;
        border-radius: 5px;
    }

    .wr-legend {
        flex-direction: column;
        gap: 8px;
    }
}
