.fare-calendar {
    position: absolute;
    z-index: 1200;
    box-sizing: border-box;
    padding: 18px;
    color: #14213d;
    background: #fff;
    border: 1px solid #dfe7f2;
    border-radius: 20px;
    box-shadow: 0 22px 55px rgba(15, 35, 70, .2);
}

.fare-calendar[hidden] { display: none; }

.fare-calendar header {
    display: grid;
    grid-template-columns: 38px 1fr 38px;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.fare-calendar header strong {
    text-align: center;
    font-size: 17px;
    color: #102f65;
}

.fare-calendar header button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: #edf4ff;
    color: #1769e8;
    font-size: 20px;
    cursor: pointer;
}

.fare-calendar header button:hover:not(:disabled) { background: #dceaff; }
.fare-calendar header button:disabled { opacity: .3; cursor: default; }

.fare-calendar-weekdays,
.fare-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
}

.fare-calendar-weekdays span {
    padding: 4px 0 7px;
    text-align: center;
    color: #8591a3;
    font-size: 11px;
    font-weight: bold;
}

.fare-calendar-day {
    min-width: 0;
    height: 52px;
    padding: 6px 2px 4px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: transparent;
    color: #13213b;
    cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}

.fare-calendar-day b,
.fare-calendar-day small { display: block; line-height: 1.2; }
.fare-calendar-day b { font-size: 14px; font-weight: bold; }
.fare-calendar-day small { min-height: 13px; margin-top: 4px; color: #07966c; font-size: 9px; font-weight: bold; }
.fare-calendar-day:hover:not(:disabled) { border-color: #b8d2fa; background: #f1f6ff; transform: translateY(-1px); }
.fare-calendar-day:hover:not(:disabled) b { color: #0d4f9f; }
.fare-calendar-day:hover:not(:disabled) small { color: #056f51; }
.fare-calendar-day.today:not(.selected) { border-color: #ff6b1a; }
.fare-calendar-day.selected { border-color: #1769e8; background: #1769e8; color: #fff; box-shadow: 0 7px 16px rgba(23, 105, 232, .25); }
.fare-calendar-day.selected small { color: #fff; }
.fare-calendar-day:disabled { color: #c3cad5; cursor: default; }
.fare-calendar-day:disabled small { color: #d8dde5; }

.fare-calendar footer {
    min-height: 16px;
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid #edf1f6;
    color: #69768a;
    font-size: 11px;
    text-align: center;
}

.fare-calendar footer.loading { color: #1769e8; }

[data-fare-calendar] { cursor: pointer; }

@media (max-width: 520px) {
    .fare-calendar { padding: 14px 10px; border-radius: 16px; }
    .fare-calendar-day { height: 48px; }
    .fare-calendar-day b { font-size: 13px; }
    .fare-calendar-day small { font-size: 8px; }
}

.fare-date-strip-wrap { margin-top: 18px; }
.fare-date-strip {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: stretch;
    overflow: hidden;
    min-height: 70px;
    background: #fff;
    border: 1px solid #c7d1df;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(16, 47, 101, .08);
}
.fare-strip-days { display: grid; grid-template-columns: repeat(7, minmax(105px, 1fr)); overflow: hidden; transition: opacity .15s ease; }
.fare-strip-days.loading { opacity: .55; }
.fare-strip-arrow { border: 0; background: #d9e9fc; color: #0b63ce; font-size: 28px; cursor: pointer; transition: background-color .15s ease,color .15s ease; }
.fare-strip-arrow:hover:not(:disabled) { background: #c8def7; color: #084f9f; }
.fare-strip-arrow:disabled { background: #e6ebf2; color: #8e9bad; cursor: default; }
.fare-strip-date {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    padding: 10px 7px;
    border-left: 1px solid #dde3eb;
    color: #202938;
    text-align: center;
    text-decoration: none;
}
.fare-strip-date:first-child { border-left: 0; }
.fare-strip-date span { font-size: 12px; white-space: nowrap; }
.fare-strip-date strong { font-size: 12px; font-weight: bold; white-space: nowrap; }
.fare-strip-date:hover { background: #f5f9ff; color: #075fc9; }
.fare-strip-date.selected { margin: 7px 5px 0; padding-bottom: 17px; color: #0878f7; background: #eef7ff; border: 0; border-radius: 10px 10px 0 0; }
.fare-strip-date.selected::after { content: ""; position: absolute; right: -5px; bottom: 0; left: -5px; height: 4px; background: #1683ff; }

html[data-ab-theme="dark"] .fare-date-strip { background: #151d2a; border-color: #344158; box-shadow: 0 10px 30px rgba(0,0,0,.24); }
html[data-ab-theme="dark"] .fare-calendar { color: #e7eef8; background: #151d2a; border-color: #344158; box-shadow: 0 22px 55px rgba(0,0,0,.45); }
html[data-ab-theme="dark"] .fare-calendar header strong { color: #e7eef8; }
html[data-ab-theme="dark"] .fare-calendar header button { color: #9bc8ff; background: #223047; }
html[data-ab-theme="dark"] .fare-calendar header button:hover:not(:disabled) { background: #2c3d58; }
html[data-ab-theme="dark"] .fare-calendar-weekdays span { color: #aebbd0; }
html[data-ab-theme="dark"] .fare-calendar-day { color: #e7eef8; }
html[data-ab-theme="dark"] .fare-calendar-day small { color: #65d6ad; }
html[data-ab-theme="dark"] .fare-calendar-day:hover:not(:disabled) { color: #fff; background: #26364c; border-color: #6ba6ee; }
html[data-ab-theme="dark"] .fare-calendar-day:hover:not(:disabled) b { color: #fff; }
html[data-ab-theme="dark"] .fare-calendar-day:hover:not(:disabled) small { color: #8be8c6; }
html[data-ab-theme="dark"] .fare-calendar-day.selected,
html[data-ab-theme="dark"] .fare-calendar-day.selected:hover:not(:disabled) { color: #fff; background: #1769e8; border-color: #75aff8; }
html[data-ab-theme="dark"] .fare-calendar-day.selected b,
html[data-ab-theme="dark"] .fare-calendar-day.selected small { color: #fff; }
html[data-ab-theme="dark"] .fare-calendar-day:disabled { color: #65738a; }
html[data-ab-theme="dark"] .fare-calendar-day:disabled small { color: #566378; }
html[data-ab-theme="dark"] .fare-calendar footer { color: #aebbd0; border-color: #344158; }
html[data-ab-theme="dark"] .fare-strip-days { background: #151d2a; }
html[data-ab-theme="dark"] .fare-strip-date { border-color: #344158; color: #dce6f3; }
html[data-ab-theme="dark"] .fare-strip-date:hover { background: #202c3d; color: #8fc0ff; }
html[data-ab-theme="dark"] .fare-strip-date.selected { background: #172b43; color: #8fc0ff; }
html[data-ab-theme="dark"] .fare-strip-arrow { background: #1d2a3c; color: #8fc0ff; }
html[data-ab-theme="dark"] .fare-strip-arrow:hover:not(:disabled) { background: #26364c; color: #c8e0ff; }
html[data-ab-theme="dark"] .fare-strip-arrow:disabled { background: #141c28; color: #65738a; }

@media (max-width: 900px) {
    .fare-date-strip { grid-template-columns: 38px minmax(0, 1fr) 38px; }
    .fare-strip-days { overflow-x: auto; grid-template-columns: repeat(7, minmax(112px, 1fr)); scrollbar-width: thin; }
}
