/* =====================================================================
   De Bruns — Appointment picker styles
   Path: /assets/css/appointments.css
   Sits alongside the existing /assets/css/* files. Loaded by
   appointmentPicker.inc via <link>. Uses the same Helvetica/Poppins
   stack as the rest of the site.
   ===================================================================== */

.appt-intro {
    margin: 12px 0 24px;
    font-size: 16px;
    line-height: 1.55;
    color: #333;
}

/* ---------- Calendar grid (14 days) ---------- */
.appt-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}

@media (max-width: 800px) {
    .appt-calendar { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 480px) {
    .appt-calendar { grid-template-columns: repeat(2, 1fr); gap: 6px; }
}

.appt-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 6px;
    min-height: 110px;
    background: #fff;
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    font-family: inherit;
    text-align: center;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.appt-day-name {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    margin-bottom: 4px;
}

.appt-day-num {
    font-size: 28px;
    font-weight: 600;
    line-height: 1;
    color: #1f2f4a;
    margin-bottom: 2px;
}

.appt-day-month {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}

.appt-day-status {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 6px;
    border-radius: 3px;
}

.appt-day-open .appt-day-status {
    background: #e6f4ea;
    color: #1e6a3a;
}

.appt-day-closed {
    cursor: not-allowed;
    background: #f6f6f6;
    border-color: #eee;
    opacity: 0.65;
}

.appt-day-closed .appt-day-num { color: #aaa; }
.appt-day-closed .appt-day-status {
    background: transparent;
    color: #aaa;
}

.appt-day-open:hover {
    border-color: #1f2f4a;
    box-shadow: 0 2px 8px rgba(31, 47, 74, 0.12);
    transform: translateY(-1px);
}

.appt-day-open:focus {
    outline: 2px solid #1f2f4a;
    outline-offset: 2px;
}

.appt-day-active {
    border-color: #1f2f4a;
    background: #1f2f4a;
}
.appt-day-active .appt-day-name,
.appt-day-active .appt-day-num,
.appt-day-active .appt-day-month { color: #fff; }
.appt-day-active .appt-day-status {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* ---------- Slots panel ---------- */
.appt-slots-panel {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 30px;
}

.appt-slots-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.appt-slots-header h2 {
    margin: 0;
    font-size: 20px;
    color: #1f2f4a;
}

.appt-slots-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 0 6px;
}
.appt-slots-close:hover { color: #1f2f4a; }

.appt-slots-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.appt-slot-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 14px;
    display: flex;
    flex-direction: column;
}

.appt-slot-time {
    font-size: 18px;
    font-weight: 600;
    color: #1f2f4a;
    margin-bottom: 4px;
}

.appt-slot-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

.appt-dur { color: #888; font-weight: normal; }

.appt-slot-btn {
    background: #1f2f4a;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .12s ease;
    font-family: inherit;
}
.appt-slot-btn:hover { background: #3e5a94; }
.appt-slot-btn:focus { outline: 2px solid #1f2f4a; outline-offset: 2px; }

.appt-no-slots {
    color: #888;
    font-style: italic;
    margin: 0;
}

/* ---------- Modal ---------- */
/* The [hidden] override is essential here: the HTML `hidden` attribute
   maps to user-agent `display: none`, but the `display: flex` below
   would otherwise win on specificity. (class + attribute) beats (class)
   so this restores the hide. Same fix applied to slots panel below. */
.appt-modal[hidden],
.appt-slots-panel[hidden] { display: none !important; }

.appt-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 9999;
    padding: 40px 16px;
    overflow-y: auto;
}

body.appt-modal-open { overflow: hidden; }

.appt-modal-card {
    background: #fff;
    width: 100%;
    max-width: 520px;
    border-radius: 8px;
    padding: 28px 28px 24px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.appt-modal-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
    color: #1f2f4a;
}

.appt-modal-slot {
    margin: 0 0 18px;
    font-size: 16px;
    color: #444;
    font-weight: 500;
}

.appt-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #888;
    cursor: pointer;
}
.appt-modal-close:hover { color: #1f2f4a; }

.appt-modal-card .form-group { margin-bottom: 14px; }
.appt-modal-card label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 14px;
}
.appt-modal-card .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
}

.appt-req { color: #c0392b; }

.appt-consent label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-weight: normal;
    font-size: 13px;
    color: #555;
    cursor: pointer;
}
.appt-consent input { margin-top: 3px; flex-shrink: 0; }

.appt-form-error {
    background: #fdecea;
    color: #a23a30;
    border: 1px solid #f5c6c1;
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 14px;
}

/* Re-use the existing site send button class for visual consistency
   but override sizing so it fits in the modal cleanly. */
.appt-modal-card .mu-send-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
}

#apptModalSuccess p { font-size: 15px; line-height: 1.55; color: #333; }

/* Honeypot field: hidden visually but not display:none (some bots
   skip display:none fields). */
.appt-honey {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
