/* ─── Bagel Calendar ────────────────────────────────────────────────────────── */

.bagel-date-picker-wrap {
    display: inline-block;
    margin: 1.25em 0;
    padding: 1.25em 1.5em;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.bagel-field-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.2em;
}

.bagel-required { color: #c00; margin-left: 2px; }

.bagel-field-note {
    font-size: 0.83em;
    color: #777;
    margin: 0 0 1em;
}

/* Header row — fixed width to match grid exactly: 7 × 36px + 6 × 2px gap = 264px */
.bagel-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 264px;
    margin-bottom: 6px;
}
.bagel-cal-header h3 { margin: 0; font-size: 0.95em; font-weight: 600; }
.bagel-cal-nav {
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    padding: 3px 9px;
    font-size: 1em;
    line-height: 1;
    color: #333;
    transition: background 0.15s;
}
.bagel-cal-nav:hover { background: #eee; }
.bagel-cal-nav:disabled { opacity: 0.3; cursor: not-allowed; }

/* Day-of-week row */
.bagel-cal-dow {
    display: grid;
    grid-template-columns: repeat(7, 36px);
    gap: 2px;
    margin-bottom: 2px;
    width: 264px;
}
.bagel-cal-dow span {
    width: 36px;
    text-align: center;
    font-size: 0.72em;
    font-weight: 600;
    color: #999;
    padding: 3px 0;
    box-sizing: border-box;
}

/* Day grid — strict fixed columns, no stretching */
.bagel-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 36px);
    gap: 2px;
    width: 264px;
}
.bagel-cal-day {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.85em;
    border: 2px solid transparent;
    box-sizing: border-box;
    transition: background 0.1s, border-color 0.1s;
}
.bagel-cal-day.empty      { background: transparent; }
.bagel-cal-day.unavailable { color: #ccc; background: transparent; text-decoration: line-through; }
.bagel-cal-day.available  {
    background: #fff;
    border-color: #4a90d9;
    color: #1a5fa8;
    font-weight: 600;
    cursor: pointer;
}
.bagel-cal-day.available:hover { background: #e8f1fb; }
.bagel-cal-day.selected   {
    background: #4a90d9;
    border-color: #4a90d9;
    color: #fff;
    font-weight: 700;
}

.bagel-selected-date-display {
    margin-top: 0.75em;
    font-size: 0.88em;
    padding: 0.4em 0.75em;
    background: #e8f5e9;
    border-left: 3px solid #43a047;
    border-radius: 3px;
    width: 264px;
    box-sizing: border-box;
}
.bagel-no-dates { color: #c00; font-size: 0.88em; margin-top: 0.5em; }

/* Sold-out dates */
.bagel-cal-day.sold-out {
    background: #f9f9f9;
    border-color: #ddd;
    color: #bbb;
    cursor: not-allowed;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
}
.bagel-soldout-label {
    font-size: 0.55em;
    color: #c0392b;
    font-weight: 600;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Paused orders message */
.bagel-orders-paused {
    background: #fff8e6;
    border-left: 3px solid #f39c12;
    border-radius: 4px;
    padding: 0.75em 1em;
    font-size: 0.95em;
    color: #7d5a00;
    margin: 0.5em 0;
}
