/* D-EDGE Dynamic Calendar — theme styling. */

/* TOKENS Measured from the original calendar on vilnius.solosociety.lt. */

.solo-dedge {
    /* The theme scales its type with --fs: 0.75 normally, 1 above 1980px. */
    --fs: 0.75;

    --dd-pink: #ffacbf;
    --dd-band: rgba(255, 172, 191, .24);
    --dd-hover: rgba(255, 172, 191, .42);
    --dd-ink: #111;
    --dd-muted: #808080;
    --dd-chip: #f2f2f2;
    --dd-circle: 22px;        /* radius; production's pill is 44.4px across */
    --dd-band-h: 42px;
    --dd-green: #12855c;      /* best price — D-EDGE ship a harsher rgb(0,138,0) */
    --dd-red: #e2445c;        /* last room */

    container-type: inline-size;
    container-name: dedge;
}

/* CONTAINER */

.solo-dedge .fbw-calendar--container {
    background: transparent;
    box-shadow: none;
    padding: 0;
    font-family: 'Objectivity', 'Inter', system-ui, -apple-system, sans-serif;
}

.solo-dedge .fbw-calendar--title { display: none; }

/* Their own control row — the theme's stepper replaces it (hideControls). */
.solo-dedge .fbw-calendar--config { display: none !important; }

/* Arrival / departure readout: two fieldsets that collide with the month nav at narrow widths. */
.solo-dedge .fbw-calendar--dates { display: none !important; }

/* Text banners revealed on hover — "Arrival", "Departure". The pill says it. */
.solo-dedge .day--in,
.solo-dedge .day--out { display: none !important; }

/* Tooltips need to escape; every variant is sized to fit, so nothing clips. */
.solo-dedge,
.solo-dedge .fbw-calendar--container,
.solo-dedge .fbw-calendar--main,
.solo-dedge .fbw-calendar--month-table-container { overflow: visible !important; }

/* MONTH HEADING + NAV */

.solo-dedge .fbw-calendar--month-name {
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: normal !important;
    color: var(--dd-ink) !important;   /* else it inherits mainColor pink */
    /* Lithuanian months are lowercase in prose ("rugsėjis"); correct grammar, wrong for a heading. */
    text-transform: capitalize !important;
}

.solo-dedge .fbw-calendar--button {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 100px;
    background: var(--dd-chip);
    color: #000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .18s var(--ease-out, ease), transform .18s var(--ease-out, ease);
}

.solo-dedge .fbw-calendar--button:hover {
    background: #e8e8e8;
    transform: translateY(-1px);
}

/* Their arrow is two bare <line>s in a 20px svg — oversized and crude in a 32px circle. */
.solo-dedge .fbw-calendar--button svg { display: none !important; }

.solo-dedge .fbw-calendar--button::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    border-radius: 1px;
}

.solo-dedge .fbw-calendar > .fbw-calendar--button:first-child::after {
    transform: rotate(135deg);
    margin-left: 3px;
}

.solo-dedge .fbw-calendar > .fbw-calendar--button:last-child::after {
    transform: rotate(-45deg);
    margin-right: 3px;
}

.solo-dedge .fbw-calendar--button:disabled::after { border-color: rgba(0, 0, 0, .25); }

/* GRID */

.solo-dedge .fbw-calendar--month {
    table-layout: fixed !important;
    width: 100% !important;
    min-height: 0 !important;        /* see note 4 */
    height: auto !important;
    border-collapse: collapse;
}

.solo-dedge .fbw-calendar--month-bloc,
.solo-dedge .fbw-calendar--month-table-container,
.solo-dedge .fbw-calendar,
.solo-dedge .solo-dedge__calendar,
.solo-dedge .fbw-calendar--bottom,
.solo-dedge .fwb-cal-bottom--group,
.solo-dedge .fbw-calendar--main,
.solo-dedge .fbw-calendar--container,
.solo-dedge .widgets--wrapper,
.solo-dedge .fb-widget {
    min-height: 0 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0;
}

.solo-dedge .fbw-calendar--month thead th {
    height: 26px;
    min-width: 0 !important;
    padding: 0;
    line-height: 1;
    text-align: center;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    color: rgba(0, 0, 0, .42) !important;
}

.solo-dedge .fbw-calendar--day {
    position: relative;
    /* Fixed, not clamp(): the min-stay bar used to sit in flow and pad the cell out to ~50px. */
    height: 50px !important;
    min-width: 0 !important;
    max-width: none !important;
    /* bottom padding reserves the strip the min-stay bar is pinned into */
    padding: 6px 0 9px !important;
    border: 0 !important;             /* they draw a 1px #f2f2f2 grid */
    border-radius: 0;
    background-color: transparent;
    font-size: 12px;
    font-weight: 700;
    color: #000;
    transition: background-image .15s var(--ease-out, ease);
}

.solo-dedge .day--number {
    margin-bottom: 1px;
    line-height: 1.25;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #000 !important;
}

.solo-dedge .day--price {
    line-height: 1.15;
    font-size: 11px !important;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--dd-muted) !important;
}

.solo-dedge .fbw-calendar--day.unavailable_day .day--number,
.solo-dedge .day--unavailable-price { color: rgba(0, 0, 0, .28) !important; }

/* D-EDGE hide the price on selected days, which collapses the cell's content to the number alone —… */
.solo-dedge .fbw-calendar--day.chosen_day .day--price,
.solo-dedge .fbw-calendar--day.day_in .day--price,
.solo-dedge .fbw-calendar--day.day_out .day--price,
.solo-dedge .fbw-calendar--day.fbw-calendar--in-between .day--price {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    color: var(--dd-ink) !important;
}

/* SELECTION AND HOVER — the whole behaviour, in one place ----------------------------------------… */

/* -- hover on a free day --------------------------------------------------- */
.solo-dedge .fbw-calendar--day.available_day:not(.chosen_day):hover {
    background-color: transparent !important;   /* they add a grey fill */
    background-image: radial-gradient(circle at 50% 50%,
        var(--dd-hover) 0 var(--dd-circle), transparent var(--dd-circle)) !important;
    background-size: 100% 100% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* -- the range: arrival, nights between, departure -------------------------- */
.solo-dedge .fbw-calendar--day.chosen_day,
.solo-dedge .fbw-calendar--day.day_in,
.solo-dedge .fbw-calendar--day.day_out,
.solo-dedge .fbw-calendar--day.fbw-calendar--in-between {
    background-color: transparent !important;   /* they fill the cell square */
}

.solo-dedge .fbw-calendar--day.fbw-calendar--in-between,
.solo-dedge .fbw-calendar--day.fbw-calendar--in-between:hover {
    background-image:
        radial-gradient(circle at 50% 50%, transparent 0 var(--dd-circle), transparent var(--dd-circle)),
        linear-gradient(var(--dd-band) 0 0) !important;
    background-size: 100% 100%, 100% var(--dd-band-h) !important;
    background-position: center, center !important;
    background-repeat: no-repeat, no-repeat !important;
}

.solo-dedge .fbw-calendar--day.fbw-calendar--in-between:hover {
    background-image:
        radial-gradient(circle at 50% 50%, var(--dd-hover) 0 var(--dd-circle), transparent var(--dd-circle)),
        linear-gradient(var(--dd-band) 0 0) !important;
}

.solo-dedge .fbw-calendar--day.day_in,
.solo-dedge .fbw-calendar--day.day_in:hover {
    background-image:
        radial-gradient(circle at 50% 50%, var(--dd-pink) 0 var(--dd-circle), transparent var(--dd-circle)),
        linear-gradient(var(--dd-band) 0 0) !important;
    background-size: 100% 100%, 50% var(--dd-band-h) !important;
    background-position: center, right center !important;
    background-repeat: no-repeat, no-repeat !important;
}

.solo-dedge .fbw-calendar--day.day_out,
.solo-dedge .fbw-calendar--day.day_out:hover {
    background-image:
        radial-gradient(circle at 50% 50%, var(--dd-pink) 0 var(--dd-circle), transparent var(--dd-circle)),
        linear-gradient(var(--dd-band) 0 0) !important;
    background-size: 100% 100%, 50% var(--dd-band-h) !important;
    background-position: center, left center !important;
    background-repeat: no-repeat, no-repeat !important;
}

/* -- only one date picked: no band anywhere -------------------------------- */
/* D-EDGE mark cells as in-between while the cursor moves, before a departure exists, which drags a… */
.solo-dedge .fbw-calendar:not(:has(.day_out)) .fbw-calendar--day.day_in,
.solo-dedge .fbw-calendar:not(:has(.day_out)) .fbw-calendar--day.day_in:hover {
    background-image: radial-gradient(circle at 50% 50%,
        var(--dd-pink) 0 var(--dd-circle), transparent var(--dd-circle)) !important;
    background-size: 100% 100% !important;
    background-position: center !important;
}

.solo-dedge .fbw-calendar:not(:has(.day_out)) .fbw-calendar--day.fbw-calendar--in-between {
    background-image: none !important;
}

.solo-dedge .fbw-calendar:not(:has(.day_out)) .fbw-calendar--day.fbw-calendar--in-between:hover {
    background-image: radial-gradient(circle at 50% 50%,
        var(--dd-hover) 0 var(--dd-circle), transparent var(--dd-circle)) !important;
    background-size: 100% 100% !important;
    background-position: center !important;
}

/* INDICATORS */

.solo-dedge .fbw-calendar--day.best-price .day--price { color: var(--dd-green) !important; font-weight: 700; }
.solo-dedge .fbw-calendar--day.best-price::after { border-width: 8px 0 0 8px !important; border-top-color: var(--dd-green) !important; }
.solo-dedge .legend-color--best { border-top-color: var(--dd-green) !important; }
.solo-dedge .best-price--legend .legend-txt { color: var(--dd-green); font-weight: 700; }

/* Minimum-stay bar: a hatched strip D-EDGE draw at the full cell width, which reads as a hard rule… */
.solo-dedge .day--min-stay {
    /* Taken OUT OF FLOW and pinned to the bottom of the cell. */
    position: absolute;
    left: 50%;
    bottom: 2px;
    transform: translateX(-50%);
    width: 50%;
    margin: 0 !important;
    pointer-events: none;
}

.solo-dedge .fbw-calendar--day.last-room::before { background: var(--dd-red) !important; }
.solo-dedge .legend-color--last { background: var(--dd-red) !important; }

/* Minimum-stay note. JS sets left/top in viewport coordinates and flips it below the day when ther… */
.solo-dedge .min_stay-details,
body > .min_stay-details {
    position: fixed !important;
    transform: none !important;
    margin: 0 !important;
    z-index: 2147483000;
    width: max-content;
    max-width: min(210px, calc(100vw - 16px));   /* 203px fits the LT string on one line */
    padding: 5px 9px;
    border-radius: 8px;
    background: var(--dd-ink, #111);
    color: #fff;
    font-family: inherit;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.3;
    text-align: center;
    box-shadow: 0 6px 20px -6px rgba(0, 0, 0, .55);
    pointer-events: none;
}

.solo-dedge .min_stay-details::after,
body > .min_stay-details::after {
    content: "";
    position: absolute;
    top: 100%;
    left: var(--arrow-x, 50%);
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--dd-ink, #111);
}

.solo-dedge .min_stay-details.is-below::after,
body > .min_stay-details.is-below::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: var(--dd-ink, #111);
}

/* Raising the hovered CELL is what lets the tooltip paint above its siblings — its own z-index can… */
.solo-dedge .fbw-calendar--day:hover { z-index: 40; }

/* LEGEND */

.solo-dedge .fbw-calendar--legend {
    display: flex !important;
    /* WRAP. Forcing one line overflows sideways at narrow widths (a horizontal scrollbar), and an elli… */
    flex-wrap: wrap !important;
    align-items: center;
    /* row gap separates the wrapped lines (LT wraps to 2-3); column gap the items */
    gap: 6px 12px !important;
    width: 100%;
    max-width: 100%;
    margin: 0 0 4px !important;
    /* Breathing room from the grid above and the Book row below. */
    padding: 6px 0 !important;
    overflow: hidden;
    line-height: 1.15;
}

.solo-dedge .fbw-calendar--legend .legend-cal {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    /* Shrink-to-fit rather than 0 0 auto: the Lithuanian labels are long ("Paskutinis (-iai) kambarys… */
    flex: 0 1 auto;
    min-width: 0;
    white-space: nowrap;
}

.solo-dedge .legend-txt {
    font-size: 10px;
    font-weight: 400;
    line-height: 1.15;
    color: var(--dd-muted);
    overflow: hidden;
    text-overflow: ellipsis;
}

/* RATE SUMMARY + BOOK BUTTON Note: the rate chip's wrapper also uses the class .best-price, same a… */

.solo-dedge .fbw-calendar--bottom { margin-top: 4px; }

.solo-dedge .fbw-calendar--action {
    display: flex !important;
    align-items: center;
    /* flex-end, not space-between: before a range is picked there is no rate chip, and space-between p… */
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
    margin-top: 4px !important;
    background: transparent !important;
}

.solo-dedge .fbw-calendar--action .best-price {
    display: flex !important;
    align-items: baseline;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    margin-right: auto;
    padding: 9px 16px !important;
    border-radius: var(--radius-pill, 100px) !important;
    background: var(--chip-bg, rgba(0, 0, 0, .05)) !important;
    overflow: hidden;
}

.solo-dedge .fbw-calendar--action .best--label {
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: var(--dd-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.solo-dedge .fbw-calendar--action .best-price > *:last-child {
    margin-left: auto;
    font-family: inherit;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
    white-space: nowrap;
    color: var(--dd-ink);
}

.solo-dedge .next { flex: 0 0 auto; background: transparent !important; }

.solo-dedge a.next--button {
    background: #000 !important;
    color: #fff !important;            /* theirs is #000 on #000 */
    border: 0;
    border-radius: var(--radius-pill, 100px);
    font-family: inherit;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    transition: background .18s var(--ease-out, ease);
}

.solo-dedge a.next--button:hover { background: #222 !important; }

/* THE THEME'S GUEST STEPPER */

.solo-dedge__guests {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 2px;
}

/* The theme styles `.guest-stepper output`. */
.solo-dedge .guest-stepper .guest-count {
    text-align: center;
    color: #000;
    font-size: max(12px, calc(16px * var(--fs)));
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1;
}

.solo-dedge__guests .guest-stepper button:disabled {
    opacity: .3;
    cursor: default;
}

/* VARIANTS The theme pins --nav to 420px and --menu to 430px with overflow-y:auto, sized for its o… */

.solo-dedge.booking-step-widget--modal,
.solo-dedge.booking-step-widget--nav,
.solo-dedge.booking-step-widget--menu {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
}

.solo-dedge.booking-step-widget--nav,
.solo-dedge.booking-step-widget--menu {
    padding: 12px;
    gap: 4px;
}

.solo-dedge.booking-step-widget--nav .guest-row,
.solo-dedge.booking-step-widget--menu .guest-row { padding-top: 5px; padding-bottom: 5px; }

/* The nav popover and menu drawer render the SAME calendar as the modal — same 50px cells, same ty… */

/* Overlays are fixed-height too; let them follow the widget. */
.booking-nav-popover:has(.solo-dedge),
.menu-booking:has(.solo-dedge) { height: auto; max-height: none; }

/* NARROW CONTAINERS @container, not @media — width comes from the container, not the screen. */

@container dedge (max-width: 330px) {
    /* The legend stays. It wraps safely at every width (verified 250-420px with zero overflow), so hid… */
    .fbw-calendar--action .best--label { font-size: 9px; }
    .fbw-calendar--action .best-price { padding: 6px 10px !important; }
    .fbw-calendar--action .best-price > *:last-child { font-size: 15px; }
    .day--price { font-size: 9px !important; }
    .day--number { font-size: 11px !important; }
}

@container dedge (max-width: 270px) {
    .fbw-calendar--day { height: 30px !important; }
    .guest-row { padding-top: 4px; padding-bottom: 4px; }
    .fbw-calendar--action { gap: 6px; }
    .next--button { padding: 0 16px !important; }
}

/* STAY TOGGLE AT NARROW WIDTHS The theme's own component, but the Lithuanian labels are long — "Tr… */

.solo-dedge .stay-toggle {
    max-width: 100%;
    overflow: hidden;
}

.solo-dedge .stay-toggle__btn {
    flex: 1 1 0;
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@container dedge (max-width: 330px) {
    .stay-toggle__btn { font-size: 12px !important; letter-spacing: -0.3px; }
}

@container dedge (max-width: 290px) {
    .stay-toggle__btn { font-size: 11px !important; padding-left: 6px; padding-right: 6px; }
    .fbw-calendar--month-name { min-height: 24px; }
}

/* LET THE CONTAINER GROW TO THE SDK'S CONTENT The theme hard-codes .booking-step-widget--nav to he… */

.booking-step-widget--nav:has(.solo-dedge),
.booking-step-widget--menu:has(.solo-dedge) {
    height: auto !important;
    max-height: calc(100vh - 116px) !important;
}

/* The nav popover hangs below a 92px header, so it gets the smaller budget. */
.booking-nav-popover:has(.solo-dedge) {
    max-height: calc(100vh - 116px);
    overflow-y: auto;
    scrollbar-width: none;
}

/* The modal is centred in the viewport and can use nearly all of it. */
.booking-modal__dialog:has(.solo-dedge) {
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    scrollbar-width: none;
}

.booking-nav-popover:has(.solo-dedge)::-webkit-scrollbar,
.booking-modal__dialog:has(.solo-dedge)::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* --------------------------------------------------------------------------- The calendar column… */

/* The theme pins .booking-step-widget to height:100% with overflow-y:auto (style.css:636), so the… */
.solo-dedge.booking-step-widget {
    height: auto !important;
    overflow-y: visible !important;
}

.solo-dedge .solo-dedge__calendar {
    flex: 0 0 auto;
    min-height: 0;
}

.solo-dedge .fb-widget {
    height: auto !important;
}

/* MODAL CLOSE BUTTON The theme pins it absolutely at top/right:14px at 40x40, so it occupies y 14-… */

.booking-modal__dialog:has(.solo-dedge) .booking-modal__close {
    top: 12px !important;
    right: 12px !important;
    width: 34px !important;
    height: 34px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .05) !important;
    color: var(--dd-ink, #111) !important;
    border-radius: 100px !important;
    cursor: pointer;
    transition: background .18s var(--ease-out, ease), color .18s var(--ease-out, ease);
}

.booking-modal__dialog:has(.solo-dedge) .booking-modal__close:hover,
.booking-modal__dialog:has(.solo-dedge) .booking-modal__close:focus-visible {
    background: var(--dd-pink, #ffacbf) !important;
    color: #000 !important;
}

.booking-modal__dialog:has(.solo-dedge) .booking-modal__close svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.2;
}

/* Clear the band the button now owns, so nothing runs underneath it. */
.solo-dedge.booking-step-widget--modal {
    padding-top: 54px !important;
}

/* BOOKING BAR MIRRORS THE SELECTION The bar's value buttons are width:100% and shrinkable, sized f… */

/* Do NOT restate width or flex here. */
/* Above 1980px the theme sets --fs: 1, taking the bar's type from 12px to 16px. */
body:has(.solo-dedge) form.booking {
    --fs: 0.75;
}

body:has(.solo-dedge) form.booking .booking__value {
    white-space: nowrap;
    min-width: max-content;
}

/* Same reasoning one level up: the field cannot shrink below what it holds. */
body:has(.solo-dedge) form.booking .field {
    min-width: max-content;
}

body:has(.solo-dedge) form.booking .btn-pill--booking-submit {
    flex: 0 0 auto;
}

/* Theme pins .booking-widget to 430px; D-EDGE needs 579px. */

.booking-widget:has(.solo-dedge),
.short-hero__booking:has(.solo-dedge),
.long-hero__booking:has(.solo-dedge) {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
}

/* Card keeps its own overflow:hidden and radius — only the height had to go. */

.booking-widget:has(.solo-dedge) > * {
    height: auto !important;
}

.solo-dedge[data-lock-stay] {
    height: auto !important;
    max-height: none !important;
}
