/* -----------------------------------------------------------------------------
 * Little Fish - Availability calendar
 * ---------------------------------------------------------------------------*/

.lf-cal {
    --lf-cal-border: var(--wp--preset--color--soft, #e5e5e5);
    --lf-cal-accent: #ace584;             /* Little Fish green */
    --lf-cal-accent-soft: #ace5841a;
    --lf-cal-muted: #7a7a7a;
    --lf-cal-bg: #fff;
    --lf-cal-radius: 10px;

    margin: 2rem 0;
    padding: 1.25rem;
    border: 1px solid var(--lf-cal-border);
    border-radius: var(--lf-cal-radius);
    background: var(--lf-cal-bg);
    font-family: var(--wp--preset--font-family--lora, inherit);
}

.lf-cal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.lf-cal__title {
    margin: 0;
    font-family: var(--wp--preset--font-family--cormorant, serif);
    font-weight: 700;
    font-size: 1.35rem;
    line-height: 1.2;
}

.lf-cal__nav {
    display: flex;
    gap: 0.5rem;
}
.lf-cal__navBtn {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--lf-cal-border);
    background: #fff;
    cursor: pointer;
    display: grid; place-items: center;
    color: inherit;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.lf-cal__navBtn:hover:not([disabled]) { background: var(--lf-cal-accent-soft); border-color: var(--lf-cal-accent); }
.lf-cal__navBtn[disabled] { opacity: 0.4; cursor: default; }
.lf-cal__navBtn svg { width: 16px; height: 16px; }

.lf-cal__weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 6px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--lf-cal-muted);
    text-align: center;
}

.lf-cal__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.lf-cal__day {
    all: unset;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    padding: 4px;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    color: #111;
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    font-variant-numeric: tabular-nums;
    font-size: 0.95rem;
}
.lf-cal__day--otherMonth { color: var(--lf-cal-muted); opacity: 0.45; cursor: default; }
.lf-cal__day--past       { color: var(--lf-cal-muted); opacity: 0.55; cursor: default; }
.lf-cal__day--empty      { cursor: default; }
.lf-cal__day--has        { background: var(--lf-cal-accent-soft); }
.lf-cal__day--has:hover  { background: var(--lf-cal-accent); color: #0e2a05; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.lf-cal__day--selected   { background: var(--lf-cal-accent); color: #0e2a05; box-shadow: 0 4px 12px rgba(172,229,132,0.45); font-weight:700; }
.lf-cal__day--today      { outline: 2px solid var(--lf-cal-accent); outline-offset: -2px; }

.lf-cal__day-num  { font-weight: 500; }
.lf-cal__day-dot  {
    position: absolute;
    bottom: 6px;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--lf-cal-accent);
}
.lf-cal__day--selected .lf-cal__day-dot { background: #0e2a05; }

.lf-cal__slots {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--lf-cal-border);
}
.lf-cal__slotsTitle {
    margin: 0 0 0.75rem;
    font-family: var(--wp--preset--font-family--cormorant, serif);
    font-weight: 700;
    font-size: 1.1rem;
}
.lf-cal__slotList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}
.lf-cal__slot {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--lf-cal-border);
    border-radius: 8px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
a.lf-cal__slot:hover {
    border-color: var(--lf-cal-accent);
    background: var(--lf-cal-accent-soft);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.lf-cal__slotTime   { font-weight: 700; font-size: 1rem; font-variant-numeric: tabular-nums; }
.lf-cal__slotLeft   { color: var(--lf-cal-muted); font-size: 0.8rem; }
.lf-cal__slotLeft--low { color: #c0392b; font-weight: 700; }

.lf-cal__msg {
    margin: 0.5rem 0;
    color: var(--lf-cal-muted);
    font-style: italic;
}

.lf-cal__loading {
    opacity: 0.6;
    pointer-events: none;
}
.lf-cal__loading::after {
    content: '';
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid var(--lf-cal-accent);
    border-top-color: transparent;
    border-radius: 50%;
    animation: lf-cal-spin 0.8s linear infinite;
    margin-left: 0.5rem;
    vertical-align: middle;
}
@keyframes lf-cal-spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
    .lf-cal { padding: 1rem; }
    .lf-cal__day { font-size: 0.85rem; }
}
