/* Rom-fanene (Riverton, Leiligheten, Booking) — visuell kalender + booking-form. */

/* RESERVED HEIGHT — kalender er ~540px (12 timer * 40px + headers) */
.rom-host-min { min-height: 540px; }

/* WEEK NAV ============================================ */
.week-nav {
    display: flex; align-items: center; gap: 0.5rem;
    margin: 0 0 0.75rem 0;
}
.week-nav-btn {
    background: var(--bg-card);
    border: 1.4px solid var(--border-light);
    color: var(--lh-4);
    padding: 0.4rem 0.7rem;
    border-radius: 8px;
    font-family: var(--font-body); font-size: 0.8rem; font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    min-height: 36px; min-width: 36px;
    display: inline-flex; align-items: center; justify-content: center;
}
.week-nav-btn:hover { background: var(--lh-1); border-color: var(--lh-4); }
.week-nav-btn:active { transform: scale(0.96); }
.week-nav-btn:focus-visible { outline: 2px solid var(--lh-3); outline-offset: 2px; }
.week-nav-today.on {
    background: var(--lh-4); color: #fff; border-color: var(--lh-4); cursor: default;
}
.week-nav-today.on:hover { background: var(--lh-4); }
.week-nav-label {
    display: flex; flex-direction: column; gap: 0.05rem;
    margin: 0 0.5rem; line-height: 1.2;
}
.week-nav-label strong {
    font-size: 0.85rem; color: var(--text-primary); font-weight: 700;
}
.week-nav-range {
    font-size: 0.7rem; color: var(--text-muted);
    font-family: var(--font-mono);
}

/* BOOKING FORM ======================================== */
.booking-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr auto;
    gap: 1rem; align-items: end;
    margin-bottom: 0.5rem;
}
@media (max-width: 720px) {
    .booking-form {
        grid-template-columns: 1fr 1fr;
    }
    .booking-form .book-btn { grid-column: 1 / -1; }
}
.booking-form .fg label {
    display: block; font-size: 0.65rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--text-muted); margin-bottom: 0.35rem;
}
.booking-form .fg input {
    width: 100%; padding: 0.55rem 0.7rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border); border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font-body); font-size: 0.8rem;
}
.booking-form .fg input:focus {
    outline: none; border-color: var(--lh-3);
    box-shadow: 0 0 0 3px var(--green-dim);
}
.book-btn {
    padding: 0.55rem 1.5rem;
    background: var(--lh-4); border: 1.4px solid var(--lh-4);
    border-radius: 6px;
    color: #fff; font-size: 0.8rem; font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-family: inherit;
}
.book-btn:hover {
    background: var(--lh-3); border-color: var(--lh-3);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.book-btn:active { transform: translateY(0) scale(0.97); transition-duration: 0.05s; }
.book-btn:focus-visible { outline: 2px solid var(--lh-3); outline-offset: 2px; }
.book-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.book-msg {
    margin: 0 0 1rem 0;
    font-size: 0.8rem; min-height: 1em;
}

/* CALENDAR-GRID ======================================= */
.cal {
    border: 1px solid var(--border);
    border-radius: 10px; overflow: hidden;
    margin-bottom: 1.25rem;
    animation: calIn 0.45s var(--ease-out) backwards;
    animation-delay: 0.10s;
}
@keyframes calIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.booking-form {
    animation: calIn 0.45s var(--ease-out) backwards;
}
.cal-block {
    animation: blockIn 0.5s var(--ease-out) backwards;
    animation-delay: 0.25s;
}
@keyframes blockIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}
.cal-header {
    display: grid; grid-template-columns: 42px repeat(7, 1fr); gap: 1px;
    background: var(--border-light);
}
.cal-h {
    background: var(--bg-secondary); padding: 0.55rem 0.3rem;
    text-align: center;
    font-family: var(--font-mono); font-size: var(--fs-xs);
    color: var(--text-muted); font-weight: 500;
}
.cal-h.today { color: var(--lh-4); font-weight: 700; background: var(--lh-1); }
.cal-body {
    display: grid; grid-template-columns: 42px repeat(7, 1fr); gap: 0 1px;
    background: var(--border-light);
}
.cal-times { display: flex; flex-direction: column; }
.cal-time {
    background: var(--bg-primary); padding: 0.15rem 0.3rem;
    font-family: var(--font-mono); font-size: 0.6rem;
    color: var(--text-muted); text-align: right; height: 40px;
    display: flex; align-items: flex-start; justify-content: flex-end;
    border-top: 1px solid var(--border-light);
}
.cal-day {
    position: relative; background: var(--bg-primary);
}
.cal-day.today-col { background: #f0f7ea; }
.cal-hour-line {
    position: absolute; left: 0; right: 0; height: 1px;
    background: var(--border-light); pointer-events: none;
}
.cal-block {
    position: absolute; left: 2px; right: 2px;
    border-left: 3px solid var(--lh-3); background: var(--lh-1);
    border-radius: 4px; padding: 0.15rem 0.3rem;
    font-size: 0.55rem; font-weight: 500; line-height: 1.3;
    color: var(--lh-4); overflow: hidden; z-index: 2;
    cursor: default; transition: box-shadow 0.15s;
}
.cal-block:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); z-index: 3; }
.cal-block .cb-name {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-block .cb-time {
    font-size: 0.5rem; color: var(--text-muted);
}
.cal-block .cb-funcs {
    font-size: 0.45rem; color: var(--text-muted);
    opacity: 0.7; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; margin-top: 1px;
}
.cal-block.int {
    border-left-color: var(--cyan);
    background: var(--cyan-dim); color: var(--cyan);
}
.cal-block.int .cb-time { color: var(--cyan); opacity: 0.6; }
.cal-block.purple {
    border-left-color: var(--purple);
    background: var(--purple-dim); color: var(--purple);
}
.cal-block.purple .cb-time { color: var(--purple); opacity: 0.6; }
.cal-del {
    cursor: pointer; position: absolute; top: 1px; right: 3px;
    font-size: 0.65rem; opacity: 0.3; line-height: 1;
}
.cal-del:hover { opacity: 1; color: var(--red); }


/* Kontakt-autocomplete (booking-form) */
.ac-wrap { position: relative; }
.ac-input { width: 100%; }
.ac-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border, #ddd);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    max-height: 220px;
    overflow-y: auto;
    z-index: 100;
}
.ac-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9em;
}
.ac-item:hover { background: var(--bg-hover, #f0f0f0); }
