/* ============================================================
   Uddens Sjögård – Hovvårdsbokning
   Stylet enligt Uddens Sjögård Brand Book Vol. 01
   Färger: Lake Blue, Sky Blue, White, Earth Beige
   Typsnitt: Clavo (rubriker), Onest (övrigt)
   ============================================================ */

.uhb-wrap {
    /* Brand-färger */
    --uhb-lake:        #13294B;   /* Lake Blue – primär mörk */
    --uhb-sky:         #89ABE3;   /* Sky Blue – primär ljus  */
    --uhb-white:       #FFFFFF;
    --uhb-beige:       #A39382;   /* Earth Beige – sekundär  */

    /* Härledda neutraler (samma underton som beige) */
    --uhb-bg:          #F7F4EF;   /* mjuk ljusbeige bakgrund  */
    --uhb-card:        #FFFFFF;
    --uhb-border:      #E5DFD4;
    --uhb-charcoal:    #1A1A1A;   /* mörkgrå brödtext         */
    --uhb-muted:       #6E6557;   /* dämpad text              */

    /* Komponenttoken */
    --uhb-radius:      6px;       /* återhållna, raka hörn    */
    --uhb-shadow:      0 1px 2px rgba(19, 41, 75, 0.04), 0 4px 24px rgba(19, 41, 75, 0.05);

    /* Typsnittsstack */
    --uhb-font-head:   'Clavo', 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --uhb-font-body:   'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

    max-width: 920px;
    margin: 3em auto;
    color: var(--uhb-charcoal);
    font-family: var(--uhb-font-body);
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: 0;
}

/* Tomt tillstånd */
.uhb-empty {
    background: var(--uhb-bg);
    border: 1px solid var(--uhb-border);
    border-radius: var(--uhb-radius);
    padding: 3em 2em;
    text-align: center;
    color: var(--uhb-muted);
}
.uhb-empty p { margin: 0.4em 0; }
.uhb-empty p:first-child { color: var(--uhb-lake); font-family: var(--uhb-font-head); font-size: 1.25em; }

/* Dagkort */
.uhb-days {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}

.uhb-day {
    background: var(--uhb-card);
    border: 1px solid var(--uhb-border);
    border-radius: var(--uhb-radius);
    padding: 2em 2.25em;
    box-shadow: var(--uhb-shadow);
}

.uhb-day-header h3 {
    margin: 0 0 0.25em;
    font-family: var(--uhb-font-head);
    font-size: 1.65em;
    font-weight: 400;
    line-height: 1.2;
    color: var(--uhb-lake);
    letter-spacing: -0.005em;
}

.uhb-day-date {
    margin: 0 0 0.75em;
    font-family: var(--uhb-font-body);
    font-size: 0.85em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--uhb-beige);
}

.uhb-day-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3em 1.5em;
    margin-bottom: 0.25em;
    font-family: var(--uhb-font-body);
}

.uhb-meta {
    color: var(--uhb-muted);
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 400;
}
.uhb-meta-count {
    color: var(--uhb-lake);
    font-weight: 500;
}

.uhb-note {
    margin: 1em 0 0;
    padding: 0.9em 1.1em;
    background: var(--uhb-bg);
    border-left: 2px solid var(--uhb-sky);
    border-radius: 0 4px 4px 0;
    color: var(--uhb-muted);
    font-size: 0.92em;
    font-style: italic;
}

/* Tidsslots */
.uhb-slots {
    margin-top: 1.4em;
    padding-top: 1.4em;
    border-top: 1px solid var(--uhb-border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.6em;
}

.uhb-slot {
    background: var(--uhb-lake);
    color: var(--uhb-white);
    border: 1px solid var(--uhb-lake);
    padding: 0.7em 1.25em;
    border-radius: 4px;
    font-size: 0.95em;
    font-family: var(--uhb-font-body);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.05s ease;
    min-width: 84px;
    letter-spacing: 0.02em;
}
.uhb-slot:hover:not(:disabled) {
    background: var(--uhb-white);
    color: var(--uhb-lake);
    border-color: var(--uhb-lake);
}
.uhb-slot:active:not(:disabled) { transform: translateY(1px); }
.uhb-slot:focus-visible {
    outline: 2px solid var(--uhb-sky);
    outline-offset: 2px;
}
.uhb-slot.is-booked {
    background: transparent;
    color: var(--uhb-beige);
    border-color: var(--uhb-border);
    cursor: not-allowed;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}
.uhb-fullbooked {
    color: var(--uhb-beige);
    font-family: var(--uhb-font-body);
    font-weight: 500;
    margin: 1em 0 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.9em;
}

/* Modal */
.uhb-modal {
    position: fixed;
    inset: 0;
    background: rgba(19, 41, 75, 0.55);   /* Lake Blue overlay */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 1em;
}
.uhb-modal[hidden] { display: none; }

.uhb-modal-inner {
    background: var(--uhb-white);
    border-radius: var(--uhb-radius);
    padding: 2.5em 2.25em 2em;
    max-width: 460px;
    width: 100%;
    position: relative;
    box-shadow: 0 16px 48px rgba(19, 41, 75, 0.25);
    max-height: 90vh;
    overflow-y: auto;
}

.uhb-close {
    position: absolute;
    top: 0.6em;
    right: 0.85em;
    background: none;
    border: none;
    font-size: 1.8em;
    line-height: 1;
    cursor: pointer;
    color: var(--uhb-muted);
    padding: 0.2em 0.4em;
    font-family: var(--uhb-font-body);
    font-weight: 300;
}
.uhb-close:hover { color: var(--uhb-lake); }

.uhb-modal h3 {
    margin: 0 0 0.5em;
    font-family: var(--uhb-font-head);
    font-size: 1.6em;
    font-weight: 400;
    color: var(--uhb-lake);
    letter-spacing: -0.005em;
}

.uhb-modal-summary {
    background: var(--uhb-bg);
    padding: 0.9em 1.1em;
    border-radius: 4px;
    margin: 0 0 1.5em;
    font-size: 0.95em;
    color: var(--uhb-charcoal);
    font-family: var(--uhb-font-body);
}

#uhb-form label {
    display: block;
    margin-bottom: 1.1em;
    font-family: var(--uhb-font-body);
    font-size: 0.78em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--uhb-lake);
}
#uhb-form input {
    display: block;
    width: 100%;
    padding: 0.75em 0.95em;
    margin-top: 0.4em;
    border: 1px solid var(--uhb-border);
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--uhb-font-body);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--uhb-charcoal);
    box-sizing: border-box;
    background: var(--uhb-white);
}
#uhb-form input:focus {
    outline: none;
    border-color: var(--uhb-lake);
    box-shadow: 0 0 0 3px rgba(137, 171, 227, 0.35);  /* Sky Blue focus */
}

.uhb-submit {
    width: 100%;
    background: var(--uhb-lake);
    color: var(--uhb-white);
    padding: 0.95em;
    border: 1px solid var(--uhb-lake);
    border-radius: 4px;
    font-size: 0.95em;
    font-family: var(--uhb-font-body);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    margin-top: 0.6em;
    transition: background 0.18s ease, color 0.18s ease;
}
.uhb-submit:hover:not(:disabled) {
    background: var(--uhb-white);
    color: var(--uhb-lake);
}
.uhb-submit:disabled { opacity: 0.55; cursor: wait; }

.uhb-message {
    margin: 1em 0 0;
    min-height: 1.2em;
    font-size: 0.92em;
    font-family: var(--uhb-font-body);
}
.uhb-message.is-error   { color: #A14B3B; }
.uhb-message.is-success { color: var(--uhb-lake); }

.uhb-fineprint {
    margin: 1em 0 0;
    font-size: 0.78em;
    color: var(--uhb-muted);
    text-align: center;
    font-family: var(--uhb-font-body);
    letter-spacing: 0.02em;
}

/* Mobil */
@media (max-width: 600px) {
    .uhb-wrap { margin: 1.5em auto; padding: 0 1em; }
    .uhb-day { padding: 1.5em 1.25em; }
    .uhb-day-header h3 { font-size: 1.4em; }
    .uhb-modal-inner { padding: 2em 1.4em 1.5em; }
    .uhb-modal h3 { font-size: 1.4em; }
    .uhb-slot { flex: 1 1 calc(33.333% - 0.4em); min-width: 0; padding: 0.7em 0.5em; }
}
@media (max-width: 380px) {
    .uhb-slot { flex: 1 1 calc(50% - 0.3em); }
}
