/* Месячный календарь: один компонент для афиши, слотов и бронирования. */
.yfg-cal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card, 18px);
    padding: 16px;
    color: var(--text-primary);
    box-shadow: var(--surface-shadow, none);
}
.yfg-cal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}
.yfg-cal__title {
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    flex: 1;
}
.yfg-cal__nav {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-control, 12px);
    border: 1px solid var(--border-color);
    background: var(--bg-hover);
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .16s ease, color .16s ease;
}
.yfg-cal__nav:hover { background: var(--color-primary); color: #fff; }
.yfg-cal__nav:focus-visible,
.yfg-cal__day:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; }
.yfg-cal__weekdays,
.yfg-cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.yfg-cal__row { display: contents; }
.yfg-cal__weekdays {
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
}
.yfg-cal__day {
    position: relative;
    min-height: 44px;
    margin: 2px;
    padding: 6px 4px 8px;
    border: 0;
    border-radius: var(--radius-control, 10px);
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    transition: background .16s ease, color .16s ease;
}
.yfg-cal__day:hover { background: var(--bg-hover); }
.yfg-cal__day.is-outside { color: var(--text-muted); opacity: .55; }
.yfg-cal__day.is-today { box-shadow: inset 0 0 0 1.5px var(--color-primary); }
.yfg-cal__day.is-selected { background: var(--gradient-main); color: #fff; box-shadow: none; }
.yfg-cal__number { font-weight: 700; line-height: 1; }
.yfg-cal__dots { display: flex; gap: 3px; height: 6px; }
.yfg-cal__dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--color-primary);
}
.yfg-cal__dot.is-booked { background: #ef4444; }
.yfg-cal__dot.is-muted { background: var(--text-muted); }
.yfg-cal__dot.is-mine { background: #f59e0b; }
.yfg-cal__legend-dot.is-mine { background: #f59e0b; }
.calendar-agenda__mine {
    display: inline-block; margin-left: 8px; padding: 2px 7px;
    border-radius: 999px; font-size: 11px; font-weight: 700;
    color: #92400e; background: #fef3c7; vertical-align: middle;
}
.yfg-cal__day.is-selected .yfg-cal__dot { background: #fff; }
.yfg-cal__legend {
    display: flex; gap: 16px; flex-wrap: wrap;
    margin-top: 10px; font-size: 12px; color: var(--text-muted);
}
.yfg-cal__legend span { display: inline-flex; align-items: center; gap: 6px; }
.yfg-cal__legend-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--color-primary);
}
.yfg-cal__legend-dot.is-muted { background: transparent; box-shadow: inset 0 0 0 1.5px var(--color-primary); }

/* Слоты: календарь слева, расписание дня справа. */
.slots-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.slots-agenda {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-card, 18px); padding: 18px;
    position: sticky; top: 84px;
}
.slots-agenda h3 { margin: 0 0 4px; font-size: 16px; }
.slots-agenda__date { color: var(--text-muted); font-size: 13px; margin-bottom: 14px; }
.slot-chip {
    display: flex; justify-content: space-between; gap: 10px;
    padding: 10px 12px; border-radius: var(--radius-control, 12px);
    background: var(--bg-hover); margin-bottom: 8px; font-size: 13px;
}
.slot-chip.is-booked { background: rgba(239, 68, 68, .08); color: var(--text-secondary); }
.slot-chip__time { font-weight: 700; }
.slot-chip__note { color: var(--text-muted); font-size: 12px; }
.slots-empty { color: var(--text-muted); font-size: 13px; padding: 16px 0; }
.slots-table { margin-top: 22px; }

/* Бронирование в профиле мастера. */
.booking-calendar { display: grid; gap: 12px; }
.booking-calendar__times { display: flex; flex-wrap: wrap; gap: 8px; }
.booking-time {
    padding: 9px 14px; border-radius: var(--radius-pill, 999px);
    border: 1px solid var(--border-color); background: var(--bg-input);
    color: var(--text-primary); font: inherit; font-size: 13px; cursor: pointer;
}
.booking-time:hover { border-color: var(--color-primary); }
.booking-time.is-selected { background: var(--gradient-main); color: #fff; border-color: transparent; }
.booking-calendar__hint { color: var(--text-muted); font-size: 13px; }

@media (max-width: 900px) {
    .slots-layout { grid-template-columns: 1fr; }
    .slots-agenda { position: static; }
}
@media (max-width: 480px) {
    .yfg-cal { padding: 10px; }
    .yfg-cal__day { min-height: 40px; font-size: 12px; margin: 1px; }
    .yfg-cal__nav { width: 36px; height: 36px; }
}

.slots-weekdays { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.slots-weekdays label { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; }
.slots-weekdays input { width: auto; }

.calendar-page { padding: 32px 16px 56px; }
.calendar-page__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.calendar-page__kicker { color: var(--color-primary-text, #b45309); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.calendar-page h1 { margin: 4px 0 6px; font-size: clamp(28px, 4vw, 40px); }
.calendar-page__head p { margin: 0; color: var(--text-muted); }
.calendar-page__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.calendar-page__layout { align-items: start; }
.calendar-agenda { min-height: 180px; }
.calendar-agenda__item {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 12px; border-radius: var(--radius-control, 12px);
    background: var(--bg-hover); color: inherit; text-decoration: none;
    margin-bottom: 8px; transition: background .16s ease;
}
.calendar-agenda__item:hover { background: var(--bg-input); }
.calendar-agenda__time { min-width: 48px; font-weight: 800; font-size: 13px; color: var(--color-primary-text, #b45309); }
.calendar-agenda__body { display: grid; gap: 2px; font-size: 14px; }
.calendar-agenda__body small { color: var(--text-muted); font-size: 12px; }
.calendar-page .slots-agenda h2 { margin: 0 0 4px; font-size: 18px; }
@media (max-width: 720px) {
    .calendar-page { padding: 22px 12px 40px; }
    .calendar-page__actions { width: 100%; }
}
