/**
 * Public styles for Whiteboard Calendar.
 */

.wbc-calendar {
    max-width: 1120px;
    margin: 24px auto;
    color: #202124;
    container-type: inline-size;
    font-family: Arial, "Helvetica Neue", sans-serif;
}

.wbc-calendar,
.wbc-calendar * {
    box-sizing: border-box;
}

.wbc-calendar.is-loading {
    opacity: 0.72;
    pointer-events: none;
}

.wbc-calendar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0;
}

.wbc-calendar__view-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
    transform: translateY(-1px);
}

.wbc-calendar__title {
    margin: 0;
    color: #3c4043;
    font-size: 22px;
    font-weight: 400;
    line-height: 1.3;
}

.wbc-calendar__view-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    border: 1px solid #dadce0;
    border-radius: 6px;
    padding: 2px;
    background: #fff;
    color: #3c4043;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
}

.wbc-calendar__view-button:hover,
.wbc-calendar__view-button:focus-visible {
    background: #f1f3f4;
    color: #202124;
}

.wbc-calendar__view-button[aria-pressed="true"] {
    border-color: #8ab4f8;
    background: #e8f0fe;
    color: #174ea6;
}

.wbc-calendar__view-icon {
    display: block;
    width: 16px;
    height: 16px;
    opacity: 0.6;
    object-fit: contain;
}

.wbc-calendar__nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.wbc-calendar__nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #80868b;
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
}

.wbc-calendar__nav-button:hover,
.wbc-calendar__nav-button:focus {
    background: #f1f3f4;
    color: #202124;
    text-decoration: none;
}

.wbc-calendar__table {
    width: 100%;
    overflow: hidden;
    border: 1px solid #dadce0;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    table-layout: fixed;
    background: #fff;
}

.wbc-calendar__table th,
.wbc-calendar__table td {
    border: 0;
    border-top: 1px solid #dadce0;
    border-left: 1px solid #dadce0;
}

.wbc-calendar__table thead th {
    border-top: 0;
}

.wbc-calendar__table th:first-child,
.wbc-calendar__table td:first-child {
    border-left: 0;
}

.wbc-calendar__table th {
    height: 38px;
    padding: 0 8px;
    text-align: center;
    background: #fff;
    color: #202124;
    font-size: 12px;
    font-weight: 500;
    line-height: 38px;
}

.wbc-calendar__day {
    position: relative;
    height: 100px;
    height: calc((100cqw - 2px) / 7);
    min-height: 0;
    overflow: hidden;
    padding: 6px 6px 5px;
    vertical-align: top;
    background: #fff;
    cursor: pointer;
}

.wbc-calendar__day:focus {
    outline: 0;
}

.wbc-calendar__day--empty,
.wbc-calendar__day--closed {
    background: #fff;
}

.wbc-calendar__day--open {
    background: #fff;
}

.wbc-calendar__day--closed {
    color: #202124;
}

.wbc-calendar__day--outside-month {
    color: #9aa0a6;
}

.wbc-calendar__day--outside-month .wbc-calendar__date,
.wbc-calendar__day--outside-month .wbc-calendar__line {
    color: #9aa0a6;
}

.wbc-calendar__day--temporary_closed {
    background: #fff;
}

.wbc-calendar__day--reserved {
    background: #fff;
}

.wbc-calendar__day--hours_changed {
    background: #fff;
}

.wbc-calendar__day--open::before,
.wbc-calendar__day--temporary_closed::before,
.wbc-calendar__day--hours_changed::before,
.wbc-calendar__day--reserved::before {
    content: "";
    position: absolute;
    inset: 4px;
    z-index: 0;
    border-radius: 6px;
    pointer-events: none;
}

.wbc-calendar__day--open::before {
    background: #f1f6ff;
}

.wbc-calendar__day--temporary_closed::before {
    background: #fce8e6;
}

.wbc-calendar__day--reserved::before {
    background: #fef7e0;
}

.wbc-calendar__day--hours_changed::before {
    background: #e6f4ea;
}

.wbc-calendar__date,
.wbc-calendar__lines {
    position: relative;
    z-index: 1;
}

.wbc-calendar__day--today::after {
    content: "";
    position: absolute;
    inset: 4px;
    z-index: 0;
    border: 2px solid #8ab4f8;
    border-radius: 6px;
    pointer-events: none;
}

.wbc-calendar__day--today.wbc-calendar__day--temporary_closed::after {
    border-color: #f7b8b3;
}

.wbc-calendar__day--today.wbc-calendar__day--reserved::after {
    border-color: #fee6a2;
}

.wbc-calendar__day--today.wbc-calendar__day--hours_changed::after {
    border-color: #b7dfc1;
}

.wbc-calendar__date {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 32px;
    height: 24px;
    margin: 0 0 1px;
    color: #686d72;
    font-size: 22px;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    line-height: 1;
    transform: translateY(1px);
}

.wbc-calendar__date-unit {
    align-self: flex-end;
    font-size: 0.64em;
    font-weight: 700;
    line-height: 1.12;
    transform: translateY(-2px);
}

.wbc-calendar__lines {
    display: grid;
    gap: 0;
    max-height: 54px;
    overflow: hidden;
    color: #3c4043;
    font-size: 11px;
    line-height: 1.35;
}

.wbc-calendar__line {
    font-weight: 500;
    overflow: hidden;
    overflow-wrap: anywhere;
    white-space: normal;
}

.wbc-calendar__line + .wbc-calendar__line {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.wbc-calendar__line + .wbc-calendar__line--summary-only {
    border-top: 0;
}

.wbc-calendar__line--summary {
    text-align: right;
}

.wbc-calendar__line--summary.wbc-calendar__line--summary-only {
    font-size: 13px;
    text-align: center;
}

.wbc-calendar__list-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid #dadce0;
    border-radius: 8px;
    background: #fff;
}

.wbc-calendar__list-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    table-layout: fixed;
    background: #fff;
}

.wbc-calendar__list-table th,
.wbc-calendar__list-table td {
    border: 0;
    border-top: 1px solid #dadce0;
    padding: 8px 10px;
    color: #202124;
    font-size: 14px;
    line-height: 1.45;
    text-align: left;
    vertical-align: top;
}

.wbc-calendar__list-table thead th {
    border-top: 0;
    background: #f8fafd;
    color: #5f6368;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.wbc-calendar__list-col-date {
    width: 85px;
}

.wbc-calendar__list-col-weekday {
    width: 64px;
}

.wbc-calendar__list-col-status {
    width: 104px;
}

.wbc-calendar__list-table th:nth-child(1),
.wbc-calendar__list-table td:nth-child(1) {
    color: #73777c;
    padding-right: 4px;
    white-space: nowrap;
}

.wbc-calendar__list-table tbody td:nth-child(2) {
    color: #73777c;
    font-size: 16px;
    font-weight: 700;
    transform: translateY(3px);
}

.wbc-calendar__list-table tbody td:nth-child(4) {
    padding-top: 12px;
    padding-bottom: 11px;
}

.wbc-calendar__list-date {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    white-space: nowrap;
    transform: translateY(4px);
}

.wbc-calendar__list-date--mobile {
    display: none;
}

.wbc-calendar__list-date-number {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

.wbc-calendar__list-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 6px;
    padding: 3px 8px;
    background: #f1f3f4;
    color: #5f6368;
    font-weight: 500;
    white-space: nowrap;
}

.wbc-calendar__list-status--regular_open {
    background: #e8f0fe;
}

.wbc-calendar__list-status--temporary_closed {
    background: #fce8e6;
}

.wbc-calendar__list-status--reserved {
    background: #fef7e0;
}

.wbc-calendar__list-status--hours_changed {
    background: #e6f4ea;
}

.wbc-calendar__list-mobile-status {
    display: none;
}

.wbc-calendar__list-lines {
    display: grid;
    gap: 4px;
}

.wbc-calendar__list-line {
    overflow: hidden;
    color: #3c4043;
    overflow-wrap: anywhere;
}

.wbc-calendar__list-empty {
    color: #5f6368;
}

.wbc-calendar__list-table th.wbc-calendar__list-weekday--0,
.wbc-calendar__list-table td.wbc-calendar__list-weekday--0,
.wbc-calendar__list-table tbody td:nth-child(2).wbc-calendar__list-weekday--0 {
    color: #c97a73;
}

.wbc-calendar__list-table th.wbc-calendar__list-weekday--6,
.wbc-calendar__list-table td.wbc-calendar__list-weekday--6,
.wbc-calendar__list-table tbody td:nth-child(2).wbc-calendar__list-weekday--6 {
    color: #6f9fd8;
}

.wbc-calendar__list-table th.wbc-calendar__list-weekday--holiday,
.wbc-calendar__list-table td.wbc-calendar__list-weekday--holiday,
.wbc-calendar__list-table tbody td:nth-child(2).wbc-calendar__list-weekday--holiday {
    color: #c97a73;
}

.wbc-calendar__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 12px;
    color: #5f6368;
    font-size: 14px;
    line-height: 1.4;
}

.wbc-calendar[data-wbc-view="list"] .wbc-calendar__legend {
    display: none;
}

.wbc-calendar__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.wbc-calendar__legend-swatch {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 1px solid #dadce0;
    border-radius: 4px;
}

.wbc-calendar__legend-swatch--open {
    background: #b8d4fb;
}

.wbc-calendar__legend-swatch--temporary-closed {
    background: #f7b8b3;
}

.wbc-calendar__legend-swatch--reserved {
    background: #fee6a2;
}

.wbc-calendar__legend-swatch--hours-changed {
    background: #b7dfc1;
}

.wbc-calendar__dialog {
    width: min(92vw, 420px);
    border: 0;
    border-radius: 8px;
    padding: 0;
    color: #202124;
    font-family: Arial, "Helvetica Neue", sans-serif;
    box-shadow: 0 12px 32px rgba(60, 64, 67, 0.28);
}

.wbc-calendar__dialog::backdrop {
    background: rgba(32, 33, 36, 0.32);
}

.wbc-calendar__dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 4px;
    border-bottom: 1px solid #dadce0;
    padding: 16px 14px 12px;
}

.wbc-calendar__dialog-title {
    margin: 0;
    border: 0;
    padding: 0;
    color: #5f6368;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.35;
}

.wbc-calendar__dialog-title::before,
.wbc-calendar__dialog-title::after {
    content: none;
}

.wbc-calendar__dialog-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 50%;
    padding: 0;
    background: transparent;
    color: #5f6368;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.wbc-calendar__dialog-close:hover,
.wbc-calendar__dialog-close:focus-visible {
    background: #f1f3f4;
    color: #202124;
}

.wbc-calendar__dialog-status {
    display: inline-block;
    margin: 14px 18px 0;
    border-radius: 999px;
    padding: 3px 10px;
    background: #fff;
    color: #202124;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.wbc-calendar__dialog--open .wbc-calendar__dialog-status {
    background: #e8f0fe;
}

.wbc-calendar__dialog--closed .wbc-calendar__dialog-status {
    background: #f1f3f4;
}

.wbc-calendar__dialog--temporary-closed .wbc-calendar__dialog-status {
    background: #fce8e6;
}

.wbc-calendar__dialog--reserved .wbc-calendar__dialog-status {
    background: #fef7e0;
}

.wbc-calendar__dialog--hours-changed .wbc-calendar__dialog-status {
    background: #e6f4ea;
}

.wbc-calendar__dialog-lines {
    display: grid;
    gap: 8px;
    padding: 14px 18px 18px;
}

.wbc-calendar__dialog--no-status .wbc-calendar__dialog-lines {
    padding: 8px 18px 18px;
}

.wbc-calendar__dialog-line,
.wbc-calendar__dialog-empty {
    margin: 0;
    color: #202124;
    font-size: 16px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.wbc-calendar__dialog-footer {
    margin: 0 4px;
    border-top: 1px solid #dadce0;
    padding: 8px 14px 10px;
    color: #80868b;
    font-size: 11px;
    line-height: 1.4;
    text-align: right;
}

.wbc-calendar__dialog-meta {
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
}

.wbc-calendar__dialog-meta:hover,
.wbc-calendar__dialog-meta:focus {
    color: #5f6368;
}

.wbc-calendar__dialog-copyright {
    margin-top: 4px;
}

@media (max-width: 700px) {
    .wbc-calendar {
        margin: 16px auto;
    }

    .wbc-calendar__header {
        margin-bottom: 0;
        padding: 0 2px;
    }

    .wbc-calendar__view-buttons {
        gap: 8px;
    }

    .wbc-calendar__title {
        font-size: 20px;
    }

    .wbc-calendar__view-button {
        width: 32px;
        min-width: 32px;
        height: 32px;
        min-height: 32px;
        padding: 1px;
        font-size: 13px;
    }

    .wbc-calendar__list-wrap {
        overflow-x: hidden;
    }

    .wbc-calendar__list-table {
        min-width: 0;
    }

    .wbc-calendar__list-col-date {
        width: 70px;
    }

    .wbc-calendar__list-col-weekday,
    .wbc-calendar__list-col-status,
    .wbc-calendar__list-table thead th:nth-child(2),
    .wbc-calendar__list-table thead th:nth-child(3),
    .wbc-calendar__list-table tbody td:nth-child(2),
    .wbc-calendar__list-table tbody td:nth-child(3) {
        display: none;
    }

    .wbc-calendar__list-mobile-status {
        display: flex;
        align-items: center;
        width: fit-content;
        min-height: 22px;
        margin-top: 6px;
        border-radius: 6px;
        padding: 2px 6px;
        background: #f1f3f4;
        color: #5f6368;
        font-size: 12px;
        font-weight: 500;
        line-height: 1.3;
        white-space: nowrap;
    }

    .wbc-calendar__list-mobile-status--regular_open {
        background: #e8f0fe;
    }

    .wbc-calendar__list-mobile-status--temporary_closed {
        background: #fce8e6;
    }

    .wbc-calendar__list-mobile-status--reserved {
        background: #fef7e0;
    }

    .wbc-calendar__list-mobile-status--hours_changed {
        background: #e6f4ea;
    }

    .wbc-calendar__list-date--desktop {
        display: none;
    }

    .wbc-calendar__list-date--mobile {
        display: inline-flex;
    }

    .wbc-calendar__list-mobile-weekday {
        font-size: 16px;
        font-weight: 700;
        transform: translateY(-2px);
    }

    .wbc-calendar__day {
        height: calc((100cqw - 2px) / 7);
        min-height: 0;
        padding: 5px 1px 0;
    }

    .wbc-calendar__day--open {
        background: #f1f6ff;
    }

    .wbc-calendar__day--temporary_closed {
        background: #fce8e6;
    }

    .wbc-calendar__day--reserved {
        background: #fef7e0;
    }

    .wbc-calendar__day--hours_changed {
        background: #e6f4ea;
    }

    .wbc-calendar__day--open::before,
    .wbc-calendar__day--temporary_closed::before,
    .wbc-calendar__day--hours_changed::before,
    .wbc-calendar__day--reserved::before {
        content: none;
    }

    .wbc-calendar__day--today::after {
        inset: 0;
        border-radius: 0;
    }

    .wbc-calendar__date {
        font-size: 16px;
        height: auto;
        min-height: 0;
        margin-bottom: 2px;
        line-height: 1;
    }

    .wbc-calendar__lines {
        gap: 0;
        font-size: 10px;
        line-height: 1.25;
        max-height: 40px;
    }

    .wbc-calendar__legend {
        padding: 0 2px;
    }
}
