/* ===== Book an Appointment popup (all classes prefixed apt-) ===== */
.apt-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;                 /* above sticky navbar, WhatsApp & scroll-top buttons */
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(8, 24, 40, .62);
    font-family: 'Poppins', sans-serif;
}
.apt-overlay.apt-open { display: flex; animation: aptFade .2s ease; }
@keyframes aptFade { from { opacity: 0; } to { opacity: 1; } }

.apt-modal {
    position: relative;
    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .3);
    animation: aptUp .25s ease;
    color: #1d2b3a;
}
@keyframes aptUp { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }

.apt-head {
    padding: 18px 56px 14px 22px;
    background: var(--bs-primary, #003A66);
    color: #fff;
    border-radius: 16px 16px 0 0;
    position: sticky;                /* title + close button stay visible while the popup scrolls */
    top: 0;
    z-index: 3;
}
.apt-head h3 { margin: 0; font-size: 19px; font-weight: 600; color: #fff; }
.apt-head p  { margin: 3px 0 0; font-size: 13px; opacity: .85; }
.apt-close {
    position: absolute;
    top: 12px; right: 12px;
    width: 34px; height: 34px;
    border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 22px; line-height: 1;
    cursor: pointer;
}
.apt-close:hover { background: rgba(255, 255, 255, .3); }
.apt-body { padding: 18px 22px 22px; }

/* ---- calendar ---- */
.apt-cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.apt-cal-nav b { font-size: 16px; font-weight: 600; }
.apt-nav-btn {
    width: 34px; height: 34px;
    border: 1px solid #d5dde5; border-radius: 50%;
    background: #fff; cursor: pointer; font-size: 15px; line-height: 1;
    color: var(--bs-primary, #003A66);
}
.apt-nav-btn:disabled { opacity: .3; cursor: not-allowed; }
.apt-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.apt-dow { font-size: 11px; font-weight: 600; color: #7a8896; padding: 4px 0; text-transform: uppercase; }
.apt-day {
    height: 42px;
    border: 0; border-radius: 10px;
    background: #f1f5f9;
    font: inherit; font-size: 14px; font-weight: 500;
    color: #1d2b3a;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.apt-day:hover:not(:disabled) { background: #dbe7f3; }
.apt-day:disabled { background: transparent; color: #c3ccd5; cursor: not-allowed; }
.apt-day.apt-today { box-shadow: inset 0 0 0 2px var(--bs-secondary, #E02454); }
.apt-day.apt-sel { background: var(--bs-primary, #003A66); color: #fff; }
.apt-day.apt-sel:hover:not(:disabled) { background: var(--bs-primary, #003A66); color: #fff; }
.apt-blank { visibility: hidden; }

/* ---- slots ---- */
.apt-slots-wrap { margin-top: 18px; padding-top: 16px; border-top: 1px dashed #d5dde5; }
.apt-slots-wrap h4 { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.apt-slots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.apt-slot {
    padding: 10px 6px;
    border: 1.5px solid #cdd8e2; border-radius: 10px;
    background: #fff;
    font: inherit; font-size: 14px; font-weight: 500;
    color: var(--bs-primary, #003A66);
    cursor: pointer;
    transition: all .15s;
}
.apt-slot:disabled { background: #f3f5f7; color: #a5b0bb; border-color: #e6ebf0; cursor: not-allowed; text-decoration: line-through; }
.apt-slot small { display: block; font-size: 10px; text-decoration: none; letter-spacing: .03em; }
.apt-slot.apt-sel { background: var(--bs-primary, #003A66); border-color: var(--bs-primary, #003A66); color: #fff; }
.apt-note { font-size: 13px; color: #6b7a88; margin: 6px 0 0; }
.apt-note.apt-err { color: #c62828; }

/* ---- buttons ---- */
.apt-btn {
    display: block; width: 100%;
    margin-top: 18px; padding: 12px 16px;
    border: 0; border-radius: 10px;
    background: var(--bs-primary, #003A66);
    color: #fff;
    font: inherit; font-weight: 600; font-size: 15px;
    cursor: pointer;
    transition: background .15s;
}
.apt-btn:hover:not(:disabled) { background: var(--bs-secondary, #E02454); }
.apt-btn:disabled { opacity: .45; cursor: not-allowed; }
.apt-link {
    background: none; border: 0; padding: 0;
    color: var(--bs-secondary, #E02454);
    font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}

/* ---- form ---- */
.apt-summary {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 11px 14px; margin-bottom: 16px;
    background: #eef4fa; border-radius: 10px;
    font-size: 14px;
}
.apt-summary b { display: block; }
.apt-field { margin-bottom: 12px; }
.apt-field label { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; }
.apt-field label i { color: #c62828; font-style: normal; }
.apt-field input,
.apt-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #cdd8e2; border-radius: 10px;
    font: inherit; font-size: 14px;
    background: #fff; color: #1d2b3a;
}
.apt-field input:focus,
.apt-field textarea:focus { outline: none; border-color: var(--bs-primary, #003A66); box-shadow: 0 0 0 3px rgba(0, 58, 102, .12); }
.apt-field.apt-bad input { border-color: #c62828; }
.apt-phone { display: flex; }
.apt-phone span {
    display: flex; align-items: center;
    padding: 0 12px;
    border: 1.5px solid #cdd8e2; border-right: 0; border-radius: 10px 0 0 10px;
    background: #f1f5f9; font-size: 14px; color: #4a5a68;
}
.apt-phone input { border-radius: 0 10px 10px 0; }
.apt-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.apt-formerr {
    margin: 4px 0 0; padding: 9px 12px;
    background: #fde7e7; color: #b71c1c;
    border-radius: 8px; font-size: 13px; font-weight: 500;
}

/* ---- success ---- */
.apt-done { text-align: center; padding: 6px 0 2px; }
.apt-tick {
    width: 64px; height: 64px; margin: 0 auto 12px;
    border-radius: 50%;
    background: #e4f3ea; color: #198754;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px;
}
.apt-done h4 { margin: 0 0 6px; font-size: 20px; font-weight: 600; }
.apt-done p { margin: 0 0 4px; font-size: 14px; color: #4a5a68; }
.apt-done .apt-when { margin: 12px 0; padding: 12px; background: #eef4fa; border-radius: 10px; color: #1d2b3a; font-weight: 600; }

body.apt-lock { overflow: hidden; }

@media (max-width: 480px) {
    .apt-overlay { padding: 0; align-items: flex-end; }
    .apt-modal { max-width: 100%; max-height: 94vh; max-height: 94dvh; border-radius: 18px 18px 0 0; }
    .apt-head { border-radius: 18px 18px 0 0; }
    .apt-body { padding: 16px 16px 22px; }
}

/* navbar button: keep it visually centred under the menu links on phones (links carry a 25px right margin) */
@media (max-width: 991.98px) {
    .navbar-nav > .btn[data-appointment] { margin-right: 25px; }
}