/* Warp DatePicker の欄とカレンダー。クラスと CSS 変数はどれも .fi-warp-date- / --fi-warp-date- で始める（ほかのプラグインと重ならないように） */

.fi-warp-date {
    --fi-warp-date-border: rgb(229 231 235);
    --fi-warp-date-muted: rgb(107 114 128);
    /* 休みの日の字。薄くしても 4.5:1 を保つ（gray-400 では白い地で 2.5:1 だった） */
    --fi-warp-date-off: rgb(107 114 128);
    --fi-warp-date-surface: #ffffff;
    --fi-warp-date-hover: rgb(243 244 246);
    --fi-warp-date-accent: var(--primary-600, #2563eb);
    --fi-warp-date-accent-text: #ffffff;
    --fi-warp-date-range: color-mix(in oklab, var(--primary-500, #3b82f6) 16%, transparent);
    --fi-warp-date-holiday: rgb(220 38 38);
    --fi-warp-date-closure: rgb(146 64 14);
    --fi-warp-date-closure-bg: rgb(254 243 199);
    --fi-warp-date-saturday: rgb(37 99 235);
    --fi-warp-date-working: rgb(15 118 110);
    --fi-warp-date-working-bg: rgb(204 251 241);
    --fi-warp-date-warning: rgb(180 83 9);
    --fi-warp-date-error: rgb(220 38 38);
    --fi-warp-date-shift: 0px;
    position: relative;
}

.dark .fi-warp-date {
    --fi-warp-date-border: rgb(255 255 255 / 0.1);
    --fi-warp-date-muted: rgb(156 163 175);
    --fi-warp-date-off: rgb(161 161 170);
    --fi-warp-date-surface: rgb(24 24 27);
    --fi-warp-date-hover: rgb(255 255 255 / 0.06);
    --fi-warp-date-accent: var(--primary-500, #3b82f6);
    --fi-warp-date-holiday: rgb(248 113 113);
    --fi-warp-date-closure: rgb(251 191 36);
    --fi-warp-date-closure-bg: rgb(251 191 36 / 0.14);
    --fi-warp-date-saturday: rgb(96 165 250);
    --fi-warp-date-working: rgb(45 212 191);
    --fi-warp-date-working-bg: rgb(45 212 191 / 0.14);
    --fi-warp-date-warning: rgb(251 191 36);
    --fi-warp-date-error: rgb(248 113 113);
}

/* ---- 欄 ---- */

.fi-warp-date-field {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.fi-warp-date-field .fi-warp-date-input {
    flex: 1 1 auto;
    min-width: 0;
}

.fi-warp-date .fi-warp-date-input {
    cursor: text;
}

.fi-warp-date .fi-warp-date-input[readonly] {
    cursor: pointer;
}

.fi-warp-date-toggle {
    display: flex;
    align-items: center;
    padding: 0 0.625rem;
    color: var(--fi-warp-date-muted);
}

.fi-warp-date-toggle:hover:not(:disabled) {
    color: var(--fi-warp-date-accent);
}

.fi-warp-date-toggle:disabled {
    cursor: default;
    opacity: 0.6;
}

/* ---- カレンダー ---- */

.fi-warp-date-panel {
    position: absolute;
    z-index: 30;
    top: calc(100% + 0.375rem);
    left: 0;
    display: flex;
    gap: 0.75rem;
    width: max-content;
    max-width: calc(100vw - 1rem);
    padding: 0.75rem;
    border: 1px solid var(--fi-warp-date-border);
    border-radius: 0.75rem;
    background: var(--fi-warp-date-surface);
    box-shadow: 0 10px 30px -10px rgb(0 0 0 / 0.25);
    font-size: 0.875rem;
    transform: translateX(var(--fi-warp-date-shift));
}

.fi-warp-date-panel.fi-warp-date-panel-above {
    top: auto;
    bottom: calc(100% + 0.375rem);
}

.fi-warp-date-panel.fi-warp-date-panel-inline {
    position: static;
    /* 狭い列では、時刻をカレンダーの下へ */
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    margin-top: 0.5rem;
    box-shadow: none;
    transform: none;
}

.fi-warp-date-main {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

/* 横に並ぶパネルでは、カレンダーを縮めない。縮めると月の表（15.5rem）が箱からはみ出し、土曜の列が時刻の欄の下に入る
   （時刻の欄の見出しや文が長い言葉で起きた）。縮むのは時刻の欄のほう */
.fi-warp-date-panel:not(.fi-warp-date-panel-inline) > .fi-warp-date-main {
    flex-shrink: 0;
}

.fi-warp-date-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.fi-warp-date-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    color: var(--fi-warp-date-muted);
}

.fi-warp-date-nav:hover {
    background: var(--fi-warp-date-hover);
}

.fi-warp-date-jump {
    display: flex;
    gap: 0.375rem;
}

.fi-warp-date-jump .fi-warp-date-month-select,
.fi-warp-date-jump .fi-warp-date-year-input {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--fi-warp-date-border);
    border-radius: 0.5rem;
    background: transparent;
    font-size: 0.875rem;
    font-weight: 600;
}

.fi-warp-date-jump .fi-warp-date-month-select {
    padding-right: 1.75rem;
}

.fi-warp-date-jump .fi-warp-date-year-input {
    width: 5rem;
}

.fi-warp-date-months {
    display: grid;
    grid-template-columns: repeat(var(--fi-warp-date-columns, 1), 15.5rem);
    gap: 0.75rem 1.25rem;
}

.fi-warp-date-panel-inline .fi-warp-date-months {
    grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
}

@media (max-width: 40rem) {
    .fi-warp-date-panel .fi-warp-date-months {
        grid-template-columns: minmax(0, 15.5rem);
    }

    .fi-warp-date-panel {
        flex-direction: column;
    }
}

.fi-warp-date-month-title {
    margin-bottom: 0.25rem;
    font-weight: 600;
    text-align: center;
}

.fi-warp-date-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.fi-warp-date-table .fi-warp-date-weekday {
    padding-bottom: 0.25rem;
    color: var(--fi-warp-date-muted);
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

.fi-warp-date-table .fi-warp-date-cell,
.fi-warp-date-table .fi-warp-date-blank {
    padding: 1px 0;
    text-align: center;
}

.fi-warp-date-day {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 2.125rem;
    height: 2.125rem;
    border-radius: 0.5rem;
    font-variant-numeric: tabular-nums;
}

.fi-warp-date-day:hover:not([aria-disabled]) {
    background: var(--fi-warp-date-hover);
}

.fi-warp-date-day:focus-visible {
    outline: 2px solid var(--fi-warp-date-accent);
    outline-offset: 1px;
}

.fi-warp-date-day.fi-warp-date-day-off {
    color: var(--fi-warp-date-off);
}

.fi-warp-date-day.fi-warp-date-day-holiday {
    color: var(--fi-warp-date-holiday);
    font-weight: 600;
}

.fi-warp-date-day.fi-warp-date-day-closure {
    background: var(--fi-warp-date-closure-bg);
    color: var(--fi-warp-date-closure);
    font-weight: 600;
}

.fi-warp-date-day-mark {
    position: absolute;
    bottom: 0.2rem;
    width: 0.25rem;
    height: 0.25rem;
    border-radius: 9999px;
    background: currentColor;
}

/* 休みの曜日・祝日でも働く日 */
.fi-warp-date .fi-warp-date-day.fi-warp-date-day-working {
    background: var(--fi-warp-date-working-bg);
    color: var(--fi-warp-date-working);
    font-weight: 600;
}

/* 選べない日（unavailableDates()）：理由はマウスを重ねると出る */
.fi-warp-date-day.fi-warp-date-day-unavailable .fi-warp-date-day-number {
    text-decoration: line-through;
}

/* 日の下の小さな字（dayLabels()）。字があるカレンダーは日を高くする */
.fi-warp-date-months-labeled .fi-warp-date-day {
    justify-content: flex-start;
    width: 2.5rem;
    height: 2.75rem;
    padding-top: 0.3rem;
}

.fi-warp-date-months-labeled .fi-warp-date-day-mark {
    top: 0.2rem;
    right: 0.25rem;
    bottom: auto;
}

.fi-warp-date-day-label {
    max-width: 100%;
    overflow: hidden;
    margin-top: 0.125rem;
    color: var(--fi-warp-date-muted);
    font-size: 0.625rem;
    font-weight: 500;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fi-warp-date-day.fi-warp-date-day-selected .fi-warp-date-day-label {
    color: inherit;
}

/* 日本の慣習：土曜は青、日曜と祝日は赤 */
.fi-warp-date[data-country='jp'] .fi-warp-date-day[data-dow='6']:not(.fi-warp-date-day-holiday, .fi-warp-date-day-closure, .fi-warp-date-day-working),
.fi-warp-date[data-country='jp'] .fi-warp-date-weekday[data-dow='6'] {
    color: var(--fi-warp-date-saturday);
}

.fi-warp-date[data-country='jp'] .fi-warp-date-day[data-dow='0']:not(.fi-warp-date-day-closure, .fi-warp-date-day-working),
.fi-warp-date[data-country='jp'] .fi-warp-date-weekday[data-dow='0'] {
    color: var(--fi-warp-date-holiday);
}

.fi-warp-date-day.fi-warp-date-day-today {
    box-shadow: inset 0 0 0 1px var(--fi-warp-date-accent);
}

.fi-warp-date-day.fi-warp-date-day-in-range {
    border-radius: 0;
    background: var(--fi-warp-date-range);
}

.fi-warp-date-day.fi-warp-date-day-range-start {
    border-radius: 0.5rem 0 0 0.5rem;
}

.fi-warp-date-day.fi-warp-date-day-range-end {
    border-radius: 0 0.5rem 0.5rem 0;
}

.fi-warp-date .fi-warp-date-day.fi-warp-date-day-selected {
    background: var(--fi-warp-date-accent);
    color: var(--fi-warp-date-accent-text);
}

.fi-warp-date-day[aria-disabled] {
    cursor: not-allowed;
    opacity: 0.35;
    text-decoration: line-through;
}

.fi-warp-date-ends {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.fi-warp-date-end {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.375rem 0.625rem;
    border: 1px solid var(--fi-warp-date-border);
    border-radius: 0.5rem;
    text-align: start;
}

.fi-warp-date-end:hover {
    background: var(--fi-warp-date-hover);
}

.fi-warp-date-end.fi-warp-date-end-active {
    border-color: var(--fi-warp-date-accent);
    box-shadow: inset 0 0 0 1px var(--fi-warp-date-accent);
}

.fi-warp-date-end-label {
    color: var(--fi-warp-date-muted);
    font-size: 0.75rem;
}

.fi-warp-date-end-date {
    font-size: 0.875rem;
    font-weight: 600;
}

.fi-warp-date-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 2rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--fi-warp-date-border);
}

.fi-warp-date-info {
    /* 長い文言でパネルを広げない（折り返す） */
    contain: inline-size;
    flex: 1 1 12rem;
    color: var(--fi-warp-date-muted);
    font-size: 0.8125rem;
}

.fi-warp-date-actions {
    display: flex;
    gap: 0.25rem;
}

.fi-warp-date-action {
    padding: 0.25rem 0.625rem;
    border-radius: 0.5rem;
    color: var(--fi-warp-date-accent);
    font-weight: 600;
}

.fi-warp-date-action:hover {
    background: var(--fi-warp-date-hover);
}

/* ---- プリセット（期間） ---- */

.fi-warp-date-presets {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 9rem;
    padding-right: 0.75rem;
    border-right: 1px solid var(--fi-warp-date-border);
}

.fi-warp-date-preset {
    padding: 0.375rem 0.625rem;
    border-radius: 0.5rem;
    text-align: start;
    white-space: nowrap;
}

.fi-warp-date-preset:hover {
    background: var(--fi-warp-date-hover);
}

.fi-warp-date-preset.fi-warp-date-preset-active {
    background: var(--fi-warp-date-range);
    color: var(--fi-warp-date-accent);
    font-weight: 600;
}

@media (max-width: 40rem) {
    .fi-warp-date-presets {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0 0 0.5rem;
        border-right: 0;
        border-bottom: 1px solid var(--fi-warp-date-border);
    }
}

/* ---- 欄の下の知らせ ---- */

.fi-warp-date-below {
    margin-top: 0.375rem;
    font-size: 0.8125rem;
}

.fi-warp-date-notice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.5rem;
}

.fi-warp-date-notice.fi-warp-date-notice-warning {
    color: var(--fi-warp-date-warning);
}

.fi-warp-date-notice.fi-warp-date-notice-error {
    color: var(--fi-warp-date-error);
}

.fi-warp-date-suggestion {
    padding: 0.125rem 0.5rem;
    border: 1px solid currentColor;
    border-radius: 9999px;
    color: var(--fi-warp-date-accent);
    font-weight: 600;
}

.fi-warp-date-suggestion:hover {
    background: var(--fi-warp-date-hover);
}

.fi-warp-date-hint {
    color: var(--fi-warp-date-muted);
    /* 時刻の欄は、ほかのタイムゾーンの時刻などを行に分けて出す */
    white-space: pre-line;
}

/* ---- 時刻（WarpDateTimePicker） ---- */

.fi-warp-date-time {
    display: flex;
    flex: 1 1 12.5rem;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 100%;
    min-width: 0;
    padding-left: 0.75rem;
    border-left: 1px solid var(--fi-warp-date-border);
}

.fi-warp-date-time-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.fi-warp-date-time-title {
    font-weight: 600;
}

.fi-warp-date-time-value {
    margin-left: 0.25rem;
    color: var(--fi-warp-date-accent);
    font-variant-numeric: tabular-nums;
}

.fi-warp-date-time-info,
.fi-warp-date-time-closed {
    color: var(--fi-warp-date-muted);
    font-size: 0.75rem;
}

.fi-warp-date-time-closed {
    color: var(--fi-warp-date-closure);
}

.fi-warp-date-time-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.fi-warp-date-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--fi-warp-date-border);
    border-radius: 9999px;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
}

.fi-warp-date-chip:hover:not([aria-disabled]) {
    background: var(--fi-warp-date-hover);
}

.fi-warp-date-chip.fi-warp-date-chip-active {
    border-color: var(--fi-warp-date-accent);
    background: var(--fi-warp-date-range);
}

.fi-warp-date-day-part {
    border-radius: 0.5rem;
}

.fi-warp-date-day-part-hours {
    color: var(--fi-warp-date-muted);
    font-size: 0.6875rem;
}

.fi-warp-date-slots.fi-warp-date-slots-more {
    mask-image: linear-gradient(to bottom, #000 calc(100% - 1rem), rgb(0 0 0 / 0.35));
}

.fi-warp-date-slots {
    display: grid;
    flex: 0 1 auto;
    grid-template-columns: repeat(auto-fill, minmax(5.25rem, 1fr));
    /* ボタンは overflow: hidden なので、行の高さを中身に合わせる（でないと 0 まで縮む） */
    grid-auto-rows: max-content;
    gap: 0.25rem;
    /* 昼休みの行で切れて午後が見えなかったので、9〜17 時がほぼ見える高さ */
    max-height: 21rem;
    overflow-y: auto;
    padding-right: 0.125rem;
    scroll-behavior: auto;
}

.fi-warp-date-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.0625rem;
    padding: 0.375rem 0.25rem;
    overflow: hidden;
    border: 1px solid var(--fi-warp-date-border);
    border-radius: 0.5rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

/* 入り具合：下から帯で埋める */
.fi-warp-date-slot::before {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: calc(var(--fi-warp-date-load, 0) * 100%);
    background: color-mix(in oklab, var(--fi-warp-date-closure) 14%, transparent);
    pointer-events: none;
}

.fi-warp-date-slot > * {
    position: relative;
}

.fi-warp-date-slot:hover:not([aria-disabled]) {
    border-color: var(--fi-warp-date-accent);
}

/* 営業時間の外：グレー（選べるかどうかは businessHoursOnly() しだい） */
.fi-warp-date-slot.fi-warp-date-slot-closed,
.fi-warp-date-chip.fi-warp-date-slot-closed {
    border-style: dashed;
    background: var(--fi-warp-date-hover);
    color: var(--fi-warp-date-off);
}

.fi-warp-date .fi-warp-date-slot.fi-warp-date-slot-selected {
    border-color: var(--fi-warp-date-accent);
    background: var(--fi-warp-date-accent);
    color: var(--fi-warp-date-accent-text);
}

.fi-warp-date-slot[aria-disabled],
.fi-warp-date-chip[aria-disabled],
.fi-warp-date-clock-mark[aria-disabled] {
    cursor: not-allowed;
    opacity: 0.4;
    text-decoration: line-through;
}

.fi-warp-date-slot-count,
.fi-warp-date-slot-label {
    color: inherit;
    font-size: 0.6875rem;
    opacity: 0.8;
}

.fi-warp-date-slot-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fi-warp-date-dropdowns {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.fi-warp-date-time-select {
    padding: 0.375rem 1.75rem 0.375rem 0.5rem;
    border: 1px solid var(--fi-warp-date-border);
    border-radius: 0.5rem;
    background-color: transparent;
    font-variant-numeric: tabular-nums;
}

.fi-warp-date-end-date.fi-warp-date-end-hint {
    color: var(--fi-warp-date-muted);
    font-weight: 400;
}

.fi-warp-date-slot-legend,
.fi-warp-date-clock-hint {
    color: var(--fi-warp-date-muted);
    font-size: 0.75rem;
    text-align: center;
}

.fi-warp-date-clock {
    position: relative;
    width: 12rem;
    height: 12rem;
    margin: 0 auto;
    border-radius: 9999px;
    background: var(--fi-warp-date-hover);
}

.fi-warp-date-clock-mark {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.875rem;
    height: 1.875rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
    transform: translate(-50%, -50%);
}

.fi-warp-date-clock-mark:hover:not([aria-disabled]) {
    background: var(--fi-warp-date-range);
}

.fi-warp-date-clock-mark.fi-warp-date-clock-closed {
    color: var(--fi-warp-date-off);
}

.fi-warp-date .fi-warp-date-clock-mark.fi-warp-date-clock-selected {
    background: var(--fi-warp-date-accent);
    color: var(--fi-warp-date-accent-text);
}

.fi-warp-date-clock-center {
    position: absolute;
    top: 50%;
    left: 50%;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    color: var(--fi-warp-date-muted);
    font-size: 0.75rem;
    transform: translate(-50%, -50%);
}

/* 5 分の数字の間の分（1 分刻みなど）：小さな点。選んだら数字と同じ色 */
.fi-warp-date-clock-mark.fi-warp-date-clock-tick {
    z-index: 1;
    width: 0.625rem;
    height: 0.625rem;
}

.fi-warp-date-clock-mark.fi-warp-date-clock-tick::before {
    content: '';
    width: 0.25rem;
    height: 0.25rem;
    border-radius: 9999px;
    background: var(--fi-warp-date-muted);
}

.fi-warp-date-clock-mark.fi-warp-date-clock-tick.fi-warp-date-clock-selected::before {
    background: currentColor;
}

.fi-warp-date-clock-24 .fi-warp-date-clock-mark {
    width: 1.625rem;
    height: 1.625rem;
    font-size: 0.75rem;
}

.fi-warp-date-clock-meridiems {
    display: flex;
    gap: 0.25rem;
    padding: 0;
}

.fi-warp-date-clock-meridiem {
    padding: 0.125rem 0.5rem;
    border: 1px solid var(--fi-warp-date-border);
    border-radius: 9999px;
    background: var(--fi-warp-date-surface);
    color: var(--fi-warp-date-muted);
    font-size: 0.75rem;
}

.fi-warp-date-clock-meridiem.fi-warp-date-clock-meridiem-active {
    border-color: var(--fi-warp-date-accent);
    color: var(--fi-warp-date-accent);
    font-weight: 600;
}

button.fi-warp-date-clock-center:hover {
    background: var(--fi-warp-date-range);
    color: inherit;
}

@media (max-width: 40rem) {
    .fi-warp-date-time {
        width: 100%;
        padding: 0.5rem 0 0;
        border-top: 1px solid var(--fi-warp-date-border);
        border-left: 0;
    }

    .fi-warp-date-slots {
        max-height: 12rem;
    }
}

/* ---- 会社のカレンダーのページ ---- */

.fi-warp-date-company {
    --fi-warp-date-legend-holiday: rgb(220 38 38);
    --fi-warp-date-legend-closure: rgb(146 64 14);
    --fi-warp-date-legend-off: rgb(107 114 128);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dark .fi-warp-date-company {
    --fi-warp-date-legend-holiday: rgb(248 113 113);
    --fi-warp-date-legend-closure: rgb(251 191 36);
    --fi-warp-date-legend-off: rgb(161 161 170);
}

.fi-warp-date-legend .fi-warp-date-legend-working {
    color: rgb(15 118 110);
}

.dark .fi-warp-date-legend .fi-warp-date-legend-working {
    color: rgb(45 212 191);
}

.fi-warp-date-subscribe {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.fi-warp-date-subscribe-link {
    flex: 1 1 20rem;
    min-width: 0;
}

/* 会社の休みの一覧（カレンダーのセレクトの下） */
.fi-warp-date-upcoming {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    font-size: 0.875rem;
}

.fi-warp-date-upcoming-title {
    font-weight: 600;
}

.fi-warp-date-upcoming-empty {
    color: var(--fi-warp-date-muted);
}

.fi-warp-date-upcoming-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem 0.5rem;
}

.fi-warp-date-upcoming-item {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.5rem;
    padding: 0.25rem 0.625rem;
    border: 1px solid color-mix(in srgb, var(--fi-warp-date-legend-closure) 35%, transparent);
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--fi-warp-date-legend-closure) 8%, transparent);
}

.fi-warp-date-upcoming-dates > span {
    white-space: nowrap;
}

.fi-warp-date-upcoming-dates {
    color: var(--fi-warp-date-legend-closure);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.fi-warp-date-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
}

.fi-warp-date-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.fi-warp-date-legend-item::before {
    content: '';
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 9999px;
    background: currentColor;
}

.fi-warp-date-legend .fi-warp-date-legend-holiday {
    color: var(--fi-warp-date-legend-holiday);
}

.fi-warp-date-legend .fi-warp-date-legend-closure {
    color: var(--fi-warp-date-legend-closure);
}

.fi-warp-date-legend .fi-warp-date-legend-off {
    color: var(--fi-warp-date-legend-off);
}

.fi-warp-date-feeds {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fi-warp-date-feed {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.fi-warp-date-feed-name {
    font-weight: 600;
}

.fi-warp-date-feed-meta,
.fi-warp-date-feeds-empty {
    color: var(--fi-warp-date-muted);
    font-size: 0.8125rem;
}

.fi-warp-date-feed-error {
    color: var(--fi-warp-date-legend-holiday);
    font-size: 0.8125rem;
}

.fi-warp-date-feed-actions {
    display: flex;
    gap: 0.5rem;
}

/* ---- 日付の列・詳細（WarpDateColumn・WarpDateEntry）：「あと 3 営業日」 ---- */

.fi-warp-date-due {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
}

.fi-warp-date-countdown {
    padding: 0.0625rem 0.4375rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.25rem;
    white-space: nowrap;
}

.fi-warp-date-countdown-gray {
    background: rgb(244 244 245);
    color: rgb(82 82 91);
}

.fi-warp-date-countdown-warning {
    background: rgb(254 243 199);
    color: rgb(146 64 14);
}

.fi-warp-date-countdown-danger {
    background: rgb(254 226 226);
    color: rgb(185 28 28);
}

.dark .fi-warp-date-countdown-gray {
    background: rgb(255 255 255 / 0.08);
    color: rgb(212 212 216);
}

.dark .fi-warp-date-countdown-warning {
    background: rgb(251 191 36 / 0.14);
    color: rgb(252 211 77);
}

.dark .fi-warp-date-countdown-danger {
    background: rgb(248 113 113 / 0.14);
    color: rgb(252 165 165);
}

/* ---- 上のバーの「営業中」（openNowBadge()） ---- */

.fi-warp-date-open-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.fi-warp-date-open-badge-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: currentColor;
}

.fi-warp-date-open-badge-open {
    background: rgb(220 252 231);
    color: rgb(21 128 61);
}

.fi-warp-date-open-badge-soon {
    background: rgb(254 243 199);
    color: rgb(180 83 9);
}

.fi-warp-date-open-badge-closed {
    background: rgb(243 244 246);
    color: rgb(75 85 99);
}

.dark .fi-warp-date-open-badge-open {
    background: rgb(34 197 94 / 0.15);
    color: rgb(134 239 172);
}

.dark .fi-warp-date-open-badge-soon {
    background: rgb(251 191 36 / 0.15);
    color: rgb(252 211 77);
}

.dark .fi-warp-date-open-badge-closed {
    background: rgb(255 255 255 / 0.06);
    color: rgb(161 161 170);
}

@media (max-width: 40rem) {
    .fi-warp-date-open-badge {
        display: none;
    }
}

/* ---- 会社のカレンダーの営業時間の表 ---- */

.fi-warp-date-hours {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    touch-action: none;
    user-select: none;
}

.fi-warp-date-hours-scroll {
    overflow-x: auto;
}

.fi-warp-date-hours-table {
    border-collapse: separate;
    border-spacing: 0 0.25rem;
    font-size: 0.75rem;
}

.fi-warp-date-hours-hour {
    min-width: 1.75rem;
    padding: 0;
    color: var(--fi-warp-date-muted);
    font-weight: 400;
    text-align: left;
}

.fi-warp-date-hours-day {
    padding-right: 0.5rem;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

.fi-warp-date-hours-cell {
    width: 0.875rem;
    min-width: 0.875rem;
    height: 1.75rem;
    padding: 0;
    border-top: 1px solid rgb(229 231 235);
    border-bottom: 1px solid rgb(229 231 235);
    background: rgb(249 250 251);
    cursor: crosshair;
}

.fi-warp-date-hours-cell:nth-child(odd) {
    border-right: 1px solid rgb(229 231 235);
}

.fi-warp-date-hours-cell.fi-warp-date-hours-open {
    background: color-mix(in oklab, var(--primary-500, #3b82f6) 55%, transparent);
}

.fi-warp-date-hours-summary {
    padding-left: 0.75rem;
    color: rgb(75 85 99);
    white-space: nowrap;
}

.dark .fi-warp-date-hours-cell {
    border-color: rgb(255 255 255 / 0.08);
    background: rgb(255 255 255 / 0.03);
}

.dark .fi-warp-date-hours-summary {
    color: rgb(161 161 170);
}

.fi-warp-date-hours-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.fi-warp-date-hours-note {
    color: rgb(180 83 9);
    font-size: 0.875rem;
}

.fi-warp-date-subscribe-hours {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    font-size: 0.875rem;
}

/* ダークの文字のリンク（今日・クリアなど）：primary-500 は暗い地で 4.5:1 に届かない色がある */
.dark .fi-warp-date-action {
    color: var(--primary-400, #60a5fa);
}
