/**
 * Theme Name: Soft
 *
 * Friendly rounded design with white plate-style date cells.
 *
 * Distinctive features:
 *  - Header has no background. The "YYYY-MM" title sits in a light
 *    gray rounded pill with black text (clickable to current month)
 *  - Navigation buttons are `<` `>` arrows in light gray pills
 *  - Weekday names: no borders or background, just text
 *  - Date cells: white background with an ultra-thin gray border
 *    and rounded corners, giving a clean "plate" look
 *  - Adjacent cells show a subtle separating line (each cell's own
 *    1px border, side by side), reading as a small visual gap
 *  - Other-month cells use a very light gray instead of white
 *  - No outer top / left frame border
 *
 * Layout note:
 *  We use `border-collapse: separate; border-spacing: 0;` so that:
 *    1. Each cell can render its own 1px border (collapse mode would
 *       merge adjacent borders into a single thinner line).
 *    2. `border-radius` actually renders on `td` (collapse mode
 *       ignores it in most browsers).
 *    3. With spacing 0, no extra horizontal/vertical gaps are added,
 *       so the absolutely-positioned event grid stays aligned with
 *       the table rows. (Non-zero border-spacing would cause
 *       cumulative vertical drift.)
 */

/* ===== Theme variables ===== */
.asb-calendar-theme-soft {
    --asb-border-color: transparent;
    --asb-header-bg: transparent;
    --asb-header-text: #1a1a1a;
    --asb-weekday-text: #888;
    --asb-sunday-text: #e57373;
    --asb-saturday-text: #7986cb;
    --asb-today-badge-bg: #ffb088;
    --asb-today-badge-text: #ffffff;
    --asb-cell-bg: #ffffff;
    --asb-cell-border: #f5f5f5;
    --asb-cell-other-bg: #f5f5f5;
    --asb-cell-hover: #fafafa;
    --asb-pill-bg: #ececec;
    --asb-pill-bg-hover: #dcdcdc;
    --asb-pill-text: #1a1a1a;
    --asb-nav-bg: #ececec;
    --asb-nav-bg-hover: #dcdcdc;
    --asb-nav-text: #1a1a1a;
    --asb-nav-border: transparent;
    --asb-radius-sm: 4px;
    --asb-radius-md: 8px;
    --asb-radius-pill: 999px;
    /* Match base header height (28px) so the absolutely-positioned
       event grid lines up with the actual weekday row. */
    --header-h: 28px;
}

/* ===== Header: no background, title becomes a pill ===== */
.asb-calendar-shortcode-wrapper .asb-calendar-theme-soft .calendar-header {
    background-color: transparent;
    border-bottom: none;
    padding: 12px 4px 14px;
}
.asb-calendar-shortcode-wrapper .asb-calendar-theme-soft .calendar-header h2 {
    font-weight: 600;
    color: var(--asb-pill-text);
    background-color: var(--asb-pill-bg);
    border-radius: var(--asb-radius-pill);
    padding: 6px 22px;
    display: inline-block;
    transition: background-color 0.2s, transform 0.15s;
}
.asb-calendar-shortcode-wrapper .asb-calendar-theme-soft .calendar-header h2.is-link {
    background-color: var(--asb-pill-bg);
    padding: 6px 22px;
}
.asb-calendar-shortcode-wrapper .asb-calendar-theme-soft .calendar-header h2.is-link:hover {
    background-color: var(--asb-pill-bg-hover);
    opacity: 1;
    transform: scale(1.02);
}

/* ===== Nav buttons: `<` `>` arrows in light gray pills ===== */
.asb-calendar-shortcode-wrapper .asb-calendar-theme-soft .calendar-header button.calendar-nav-button {
    background-color: var(--asb-nav-bg);
    border: none;
    color: var(--asb-nav-text);
    border-radius: var(--asb-radius-pill);
    padding: 6px 14px;
    font-size: 1.1em;
    line-height: 1;
    font-weight: 700;
    transition: background-color 0.2s, transform 0.15s;
    min-width: 38px;
    position: relative;
}
/* Hide original button text, keep accessible to screen readers. */
.asb-calendar-shortcode-wrapper .asb-calendar-theme-soft .calendar-header button.calendar-nav-button .button-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.asb-calendar-shortcode-wrapper .asb-calendar-theme-soft .calendar-header button.prev-month::before {
    content: "\003C";
}
.asb-calendar-shortcode-wrapper .asb-calendar-theme-soft .calendar-header button.next-month::before {
    content: "\003E";
}
.asb-calendar-shortcode-wrapper .asb-calendar-theme-soft .calendar-header button.calendar-nav-button:hover {
    background-color: var(--asb-nav-bg-hover);
    transform: scale(1.05);
}

/* ===== Aggressive border reset on table-level elements =====
   Ensures no top / left line appears at the calendar edge or
   between the weekday row and the date rows. The base stylesheet
   sets borders only on th / td, but some browsers render default
   thead / tbody separators; this reset eliminates them. */
.asb-calendar-shortcode-wrapper .asb-calendar-theme-soft .calendar-table {
    border: 0 !important;
    border-collapse: separate;
    border-spacing: 0;
}
.asb-calendar-shortcode-wrapper .asb-calendar-theme-soft .calendar-table thead,
.asb-calendar-shortcode-wrapper .asb-calendar-theme-soft .calendar-table tbody,
.asb-calendar-shortcode-wrapper .asb-calendar-theme-soft .calendar-table tr {
    border: 0 !important;
    background: transparent !important;
}

/* ===== Weekday header: borderless, no background ===== */
.asb-calendar-shortcode-wrapper .asb-calendar-theme-soft .calendar-table th {
    border: none !important;
    background-color: transparent !important;
    font-weight: 600;
    font-size: 0.78em;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    /* Total height stays close to --header-h (28px). */
    padding: 4px 4px;
    color: var(--asb-weekday-text);
}

/* ===== Date cells: white plates with ultra-thin border =====
   Each cell has an independent 1px border (separate mode) and
   border-radius; adjacent cells' borders sit side by side, which
   visually reads as a thin separator line between cells. */
.asb-calendar-shortcode-wrapper .asb-calendar-theme-soft .calendar-table td {
    border: 1px solid var(--asb-cell-border);
    background-color: var(--asb-cell-bg);
    background-clip: padding-box;
    border-radius: var(--asb-radius-md);
    box-sizing: border-box;
    transition: background-color 0.2s ease;
}
/* other-month cells: rely on base styles + JS-set inline background.
   JS now sets the inline bg to either `cellOtherMonthBg` (default gray)
   or a regular-label color (Sat/Sun/holidays), so we no longer override
   here. The base stylesheet adds the white overlay for the faded look. */
.asb-calendar-shortcode-wrapper .asb-calendar-theme-soft .calendar-table td:not(.other-month):hover {
    background-color: var(--asb-cell-hover);
}
.asb-calendar-shortcode-wrapper .asb-calendar-theme-soft .calendar-table td .date-number {
    font-weight: 500;
}
.asb-calendar-shortcode-wrapper .asb-calendar-theme-soft .calendar-table td.today .date-number {
    font-weight: 700;
}
