/* Month calendar */

.awl-month-category-grid {
    margin-bottom: 16px;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--app-border-color);
}

.awl-month-table {
    width: 100%;
    table-layout: fixed;
    border-spacing: 0;
    border-collapse: collapse;
}

.awl-month-table thead tr:first-child th { border-top: 0; }
.awl-month-table tbody tr:last-child  td { border-bottom: 0; }
.awl-month-table th:first-child,
.awl-month-table td:first-child { border-left: 0; }
.awl-month-table th:last-child,
.awl-month-table td:last-child  { border-right: 0; }

.awl-month-table th,
.awl-month-table td {
    padding: 4px 6px;
    border: 1px solid var(--app-border-color);
    font-size: 0.8rem;
    font-weight: normal;
    background-clip: padding-box;
}

.awl-month-table th {
    background: var(--app-header-border-color);
}

.awl-month-category-header {
    background: var(--app-header-border-color) !important;
}

.awl-month-day,
.awl-month-day-header {
    width: 30px;
    min-width: 30px;
    max-width: 30px;
    text-align: center;
    padding: 2px;
    font-size: 0.8rem;
}

.awl-month-artist,
.awl-month-artist-header {
    width: auto;
    min-width: 160px;
    text-align: left;
    padding-left: 10px;
}

.awl-month-artist {
    background: var(--app-component-color);
}

.awl-month-weekend {
    background: var(--app-component-color-alt);
}

.awl-month-table th.awl-month-weekend {
    background: var(--app-component-header-color-alt);
}

.awl-month-table tbody tr:hover td {
    position: relative;
    transition: background-color 0.15s ease-in-out;
}

.awl-month-table tbody tr:hover td::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.02);
    pointer-events: none;
    z-index: 0;
}

body.dark .awl-month-table tbody tr:hover td::before {
    background: rgba(255, 255, 255, 0.02);
}

.awl-month-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--app-header-border-color);
}

.awl-month-table thead th.awl-month-weekend {
    background: var(--app-component-header-color);
}

.awl-month-table th:first-child,
.awl-month-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 4;
    background: var(--app-component-color);
}

.awl-month-day-animate {
    opacity: 0;
    transform: scale(0.6);
    animation-name: awlMonthFadeIn;
    animation-timing-function: ease-out;
    animation-fill-mode: forwards;
}

@keyframes awlMonthFadeIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.awl-month-table td.awl-month-today,
.awl-month-table th.awl-month-today {
    background: color-mix(in srgb, var(--warning-color-border) 10%, transparent);
}

.awl-month-table td.awl-month-today.awl-month-weekend,
.awl-month-table th.awl-month-today.awl-month-weekend {
    background: color-mix(in srgb, var(--warning-color-border) 15%, var(--app-component-color-alt));
}

.awl-month-table th.awl-month-today,
.awl-month-table th.awl-month-today.awl-month-weekend {
    color: var(--warning-color);
}

.awl-month-tooltip {
    position: absolute;
    display: none;
    background: var(--app-component-color);
    border: 1px solid var(--app-border-color);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    padding: 6px 10px;
    font-size: 0.75rem;
    z-index: 9999;
    max-width: 300px;
    color: var(--app-font-color);
    pointer-events: none;
    line-height: 1.3em;
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
}
.awl-month-tooltip .tooltip-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.awl-month-tooltip .awl-small-time {
    display: inline-block;
    width: 90px;
    margin-right: 4px;
}

.awl-month-day.selected {
    color: #ffe600 !important;
    outline: 2px solid #ffe600;
    outline-offset: -2px;
    box-shadow: 0 0 6px rgba(247, 217, 76, 0.6);
    z-index: 2;
    position: relative;
}

tr.artist-highlight td {
    background-color: rgba(255, 245, 200, 0.2);
}

tr.artist-highlight td.awl-month-weekend {
    background-color: rgba(213, 209, 193, 0.4);
}

.awl-month-artist.artist-highlight-cell {
    background-color: rgba(255, 245, 200, 0.2) !important;
    font-weight: 600;
}

#planningData { scroll-margin-top: 80px; }

.awl-month-loader {
    color: var(--primary-color);
    display: none;              /* hidden by default */
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}

.awl-month-loader svg {
    width: 26px;
    height: 26px;
}

/* year */

.awl-year-grid {
    border-radius: var(--border-radius);
    overflow-x: auto;
}

.awl-year-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 900px;
}

.awl-year-table th {
    font-size: 0.8rem;
    background: #222426;
    font-weight: normal;
    position: sticky;
    top: 0;
    z-index: 2;
    min-width: 30px;
}

.awl-year-day {
    width: 26px;
    height: 26px;
    color: var(--app-font-color-grayer);
}

.awl-year-day.selected {
    /* Highlight the whole selected range as a band instead of boxing every cell */
    background: color-mix(in srgb, #ffe600 18%, transparent) !important;
    border-top-color: #ffe600;
    border-bottom-color: #ffe600;
    position: relative;
    z-index: 2;
    outline: none;
    box-shadow: none;
}

/* Join selected cells so the inner borders disappear */
.awl-year-day.selected + .awl-year-day.selected {
    border-left-color: transparent;
}

/* Draw the right edge of the range on the first non‑selected cell after it */
.awl-year-day.selected + .awl-year-day:not(.selected) {
    border-left-color: var(--warning-color-border);
}

/* Make sure the very first selected cell in a row also has a left edge */
.awl-year-month + .awl-year-day.selected,
.awl-year-day.selected:first-child {
    border-left-color: var(--warning-color-border);
}

.awl-year-table th,
.awl-year-table td {
    text-align: center;
    padding: 4px 6px;
    font-size: 0.8rem;
    border: 1px solid var(--app-border-color);
}

.awl-year-yearcell {
    text-align: left !important;
    background: #242628;
    padding-left: 10px;
}

.awl-year-month {
    text-align: left !important;
    text-transform: capitalize;
    background: var(--app-component-color);
    padding-left: 10px;
}

.awl-year-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.awl-year-nav {
    background: #2b2d2f;
    color: #8ab4f8;
    border: 1px solid #2e3133;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.awl-year-nav:hover {
    background: #333537;
    border-color: #5fa8ff;
}


.awl-year-grid th {
    background: var(--app-header-border-color);
}

.awl-year-grid th.awl-year-weekend {
    background: var(--app-component-header-color);
}

.awl-year-day.awl-year-weekend {
    background: var(--app-component-color-alt);
}

.awl-year-loader {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 0;              /* same inline feel as month */
    color: var(--primary-color); /* important: same as month */
    justify-content: center;
}

.awl-year-loader svg {
    width: 26px;
    height: 26px;
}

/* Compact year view – smaller form factor */
.awl-year-grid.compact {
    border-radius: var(--border-radius);
    border: 1px solid var(--app-border-color);
    box-shadow: none;
    background: var(--app-component-color);
}

/* Make the table slightly tighter */
.awl-year-grid.compact .awl-year-table {
    min-width: 580px;
}

.awl-year-grid.compact .awl-year-table thead {
    display: none;
}

/* Cells + headers smaller, closer to month view */
.awl-year-grid.compact .awl-year-table th,
.awl-year-grid.compact .awl-year-table td {
    padding: 1px 2px;
    border: 1px solid var(--app-border-color);
    font-size: 0.65rem;
    min-width: 24px;
}

/* Month labels on the left */
.awl-year-grid.compact .awl-year-month {
    background: var(--app-component-color);
    color: var(--app-font-color);
    border-right: 1px solid var(--app-border-color);
    padding-left: 6px;
    font-size: 0.75rem;
}

/* Year cell at top-left */
.awl-year-grid.compact .awl-year-yearcell {
    background: var(--app-header-border-color);
    color: var(--app-font-color);
    border-right: 1px solid var(--app-border-color);
    padding-left: 6px;
    font-size: 0.75rem;
}

/* Day cells */
.awl-year-grid.compact .awl-year-day {
    width: 16px;
    height: 16px;
    font-size: 0.65rem;
}

/* Weekday / weekend coloring similar to month */
.awl-year-grid.compact .awl-year-day.awl-year-weekday {
    background: var(--app-component-color);
}

.awl-year-grid.compact .awl-year-day.awl-year-weekend {
    background: var(--app-component-color-alt);
}

/* Header row weekend styling */
.awl-year-grid.compact .awl-year-table thead th.awl-year-weekend {
    background: var(--app-component-header-color-alt);
}

/* Today highlight similar vibe to month */
.awl-year-grid.compact .awl-year-day.today {
    background: color-mix(in srgb, var(--warning-color-border) 12%, transparent);
}

.awl-year-day.today {
    background: color-mix(in srgb, var(--confirmed-color-border) 16%, var(--app-component-color));
}