/**
 * @file
 * Visual styles for the Discount Calender block.
 *
 * Palette & feeling:
 * - Dark background (#101014) similar to pdp-draft-summary overlay.
 * - Card-like surfaces with subtle gradients and light borders.
 * - Accent colors:
 *    - Yellow/amber: #ffd676, #ffb44b, #ff7f4b
 *    - Soft blues for links: #72d8ff
 *
 * BEM root: .dc-block
 */

/* ---------------------------------------------------------------------------
 * Root block wrapper
 * ------------------------------------------------------------------------- */

.dc-block {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem 1.2rem;
  border-radius: 1.1rem;
  background: radial-gradient(
    circle at 0% 0%,
    #26263a 0%,
    #171724 60%,
    #101014 100%
  );
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 18px 45px rgba(0, 0, 0, 0.45);
  color: #f7f7fb;
  font-family: var(
    --mw-font-primary,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif
  );
}

.dc-block__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}

.dc-block__header-main {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.dc-block__title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.4;
  font-weight: 600;
}

.dc-block__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: #b3b3c7;
}

.dc-block__window {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: rgba(243, 243, 255, 0.84);
}

/* View toggle container */
.dc-block__view-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

/* View toggle buttons (support both older and current class names) */
.dc-block__view-btn,
.dc-view-toggle__btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.25rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.3);
  color: rgba(240, 240, 255, 0.9);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.1s ease;
}

.dc-block__view-btn:hover,
.dc-view-toggle__btn:hover,
.dc-block__view-btn:focus-visible,
.dc-view-toggle__btn:focus-visible {
  background: rgba(0, 0, 0, 0.45);
  outline: none;
  transform: translateY(-1px);
}

.dc-block__view-btn.is-active,
.dc-view-toggle__btn.is-active {
  background: rgba(255, 214, 118, 0.16);
  color: #ffd676;
  box-shadow: 0 0 0 1px rgba(255, 214, 118, 0.6);
}

/* Divider below header (similar to pdp-draft-summary) */
.dc-block__header-divider {
  margin: 0.6rem 0 0.9rem;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.06)
  );
}

.dc-block__views {
  margin-top: 0.3rem;
}

.dc-block__empty {
  margin-top: 0.25rem;
  padding: 0.8rem 0.9rem;
  border-radius: 0.75rem;
  background: rgba(16, 16, 22, 0.86);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  font-size: 0.85rem;
  color: #b3b3c7;
}

/* View panes */
.dc-view {
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.dc-view.is-hidden {
  display: none;
}

/* Responsive header layout */
@media (max-width: 720px) {
  .dc-block__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .dc-block__view-toggle {
    align-self: stretch;
    justify-content: flex-start;
  }
}

/* ---------------------------------------------------------------------------
 * Calendar view
 * ------------------------------------------------------------------------- */

.dc-calendar {
  border-radius: 0.9rem;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.08)
  );
  padding: 0.7rem 0.75rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.dc-calendar__empty {
  padding: 0.8rem 0.9rem;
  border-radius: 0.75rem;
  background: rgba(16, 16, 22, 0.9);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  font-size: 0.85rem;
  color: #b3b3c7;
}

.dc-calendar__month {
  border-radius: 0.8rem;
  background: rgba(16, 16, 22, 0.96);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.03);
  padding: 0.65rem 0.75rem 0.8rem;
}

.dc-calendar__month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.3rem;
}

.dc-calendar__month-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(243, 243, 255, 0.92);
}

.dc-calendar__grid {
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Week row (also used for header row with weekdays) */
.dc-calendar__week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.2rem;
}

.dc-calendar__week--header {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(243, 243, 255, 0.65);
}

.dc-calendar__weekday {
  text-align: center;
  padding: 0.2rem 0.1rem;
}

/*
 * A2 OVERLAY SUPPORT (Week wrapper)
 * - Each real week is wrapped into a positioning context:
 *     <div class="dc-calendar__week-wrap">
 *       <div class="dc-calendar__week"> ...days... </div>
 *       <div class="dc-calendar__ranges"> ...range segments... </div>
 *     </div>
 */
.dc-calendar__week-wrap {
  position: relative;
}

/*
 * Range overlay plane for the week.
 * - Uses the same 7-column grid as the day tiles.
 * - Absolute overlay so it does not consume extra vertical space.
 * - Pointer-events disabled on the plane; enabled only on the segments.
 */
.dc-calendar__ranges {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.2rem;
  pointer-events: none;
  z-index: 3; /* above tiles */
}

/* Day cell */
.dc-calendar__day {
  position: relative;
  min-height: 3rem;
  border-radius: 0.55rem;
  padding: 0.25rem 0.25rem 0.3rem;
  background: radial-gradient(
    circle at 0% 0%,
    #26263a 0%,
    #171724 60%,
    #111119 100%
  );
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02),
    0 7px 16px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.dc-calendar__day--empty {
  background: rgba(8, 8, 12, 0.9);
  box-shadow: none;
  opacity: 0.3;
}

/* Outside of visible window / other months */
.dc-calendar__day--outside-window,
.dc-calendar__day--outside {
  opacity: 0.45;
}

/* Today highlight */
.dc-calendar__day--today {
  box-shadow:
    0 0 0 1px rgba(255, 214, 118, 0.7),
    0 0 0 3px rgba(255, 214, 118, 0.25),
    0 9px 20px rgba(0, 0, 0, 0.6);
}

/* Keep day number above overlay bars for readability. */
.dc-calendar__day-number {
  position: relative;
  z-index: 4;
  font-size: 0.78rem;
  font-weight: 600;
  color: #f7f7fb;
  margin-bottom: 0.2rem;
}

/* Events inside day cell (support both old and new class names) */
.dc-calendar__events,
.dc-calendar__day-events {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.dc-calendar__event {
  appearance: none;
  border: none;
  width: 100%;
  text-align: left;
  border-radius: 999px;
  padding: 0.18rem 0.32rem;
  font-size: 0.72rem;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(243, 243, 255, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.25rem;
  transition:
    background-color 0.12s ease,
    box-shadow 0.12s ease,
    transform 0.1s ease;
}

.dc-calendar__event:hover,
.dc-calendar__event:focus-visible {
  outline: none;
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 0 1px rgba(114, 216, 255, 0.6);
  transform: translateY(-1px);
}

.dc-calendar__event-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Small indicator dot (used by calendar cell events) */
.dc-calendar__event-indicator {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

/* State accents (shared across cell + range triggers via data-dc-event-state) */
.js-dc-event[data-dc-event-state="ongoing"] .dc-calendar__event-indicator,
.js-dc-event-range[data-dc-event-state="ongoing"] .dc-calendar__event-indicator {
  background: rgba(255, 214, 118, 0.95);
}

.js-dc-event[data-dc-event-state="future"] .dc-calendar__event-indicator,
.js-dc-event-range[data-dc-event-state="future"] .dc-calendar__event-indicator {
  background: rgba(114, 216, 255, 0.95);
}

.js-dc-event[data-dc-event-state="past"] .dc-calendar__event-indicator,
.js-dc-event-range[data-dc-event-state="past"] .dc-calendar__event-indicator {
  background: rgba(255, 255, 255, 0.38);
}

/* ---------------------------------------------------------------------------
 * Multi-day range bar (A2 overlay)
 * ------------------------------------------------------------------------- */

/*
 * Trigger rendered inside .dc-calendar__ranges.
 * - Must be clickable: pointer-events re-enabled.
 * - Grid placement (grid-column) comes from inline style in Twig (start/span).
 */
.dc-calendar__range,
.dc-calendar__event--range {
  appearance: none;
  border: none;
  align-self: center;
  justify-self: stretch;
  margin: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffb44b, #ff7f4b);
  color: #1a1010;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(0, 0, 0, 0.35);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    filter 0.12s ease;
}

/* Default sizing for overlay segment */
.dc-calendar__range,
.js-dc-event-range.dc-calendar__range,
.js-dc-event-range.dc-calendar__event--range,
.dc-calendar__event--range {
  padding: 0.22rem 0.6rem;
}

/* Place the overlay bar vertically centered within the week tile area */
.dc-calendar__ranges .dc-calendar__range,
.dc-calendar__ranges .dc-calendar__event--range {
  pointer-events: auto; /* allow click on the bar */
  z-index: 3;
  position: relative;
  top: 42%;
  transform: translateY(-50%);
}

/* Cursor + hover + focus ring */
.js-dc-event-range {
  cursor: pointer;
}

.js-dc-event-range:hover {
  transform: translateY(-50%) scale(1.01);
  filter: saturate(1.05);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(114, 216, 255, 0.35);
}

.js-dc-event-range:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(114, 216, 255, 0.45),
    0 8px 18px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(0, 0, 0, 0.35);
}

/* State styling for range bars */
.js-dc-event-range[data-dc-event-state="ongoing"] {
  background: linear-gradient(90deg, #ffd676, #ffb44b);
  color: #1a1010;
}

.js-dc-event-range[data-dc-event-state="future"] {
  background: linear-gradient(90deg, rgba(114, 216, 255, 0.95), rgba(75, 169, 255, 0.95));
  color: rgba(8, 19, 26, 0.95);
}

.js-dc-event-range[data-dc-event-state="past"] {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.1));
  color: rgba(243, 243, 255, 0.88);
}

/* Legacy indicator inside the old range button is hidden for the bar style */
.dc-calendar__event--range .dc-calendar__event-indicator {
  display: none;
}

/* ---------------------------------------------------------------------------
 * List view
 * ------------------------------------------------------------------------- */

.dc-list {
  border-radius: 0.9rem;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.09)
  );
  padding: 0.75rem 0.8rem 0.8rem;
}

.dc-list__empty {
  padding: 0.8rem 0.9rem;
  border-radius: 0.75rem;
  background: rgba(16, 16, 22, 0.9);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  font-size: 0.85rem;
  color: #b3b3c7;
}

/* Sections: past / ongoing / future */
.dc-list__section {
  padding: 0.4rem 0 0.6rem;
}

.dc-list__section + .dc-list__section {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin-top: 0.35rem;
}

.dc-list__section-header {
  margin-bottom: 0.25rem;
}

.dc-list__section-title {
  margin: 0;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(243, 243, 255, 0.86);
}

.dc-list__section--ongoing .dc-list__section-title {
  color: #ffd676;
}

.dc-list__section--future .dc-list__section-title {
  color: #72d8ff;
}

/* Items */
.dc-list__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.dc-list__item {
  list-style: none;
}

.dc-list__item-inner {
  appearance: none;
  width: 100%;
  border: none;
  border-radius: 0.8rem;
  padding: 0.5rem 0.55rem 0.55rem;
  background: rgba(16, 16, 22, 0.95);
  color: #f5f5ff;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  cursor: pointer;
  box-shadow:
    0 7px 16px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.03);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background-color 0.12s ease;
}

.dc-list__item-inner:hover,
.dc-list__item-inner:focus-visible {
  outline: none;
  transform: translateY(-1px);
  background: rgba(18, 18, 26, 0.98);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(114, 216, 255, 0.45);
}

.dc-list__item-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

/* Badge for today section */
.dc-list__item-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 214, 118, 0.14);
  color: #ffd676;
}

.dc-list__item-dates {
  font-size: 0.76rem;
  color: #b3b3c7;
}

.dc-list__item-title {
  font-size: 0.88rem;
  font-weight: 600;
  margin-top: 0.03rem;
}

.dc-list__item-summary {
  font-size: 0.8rem;
  color: #b5b5cf;
}

.dc-list__item-products {
  margin-top: 0.18rem;
  font-size: 0.78rem;
  color: #b3b3c7;
}

.dc-list__item-products-label {
  font-weight: 500;
  margin-right: 0.25rem;
}

.dc-list__item-products-list {
  list-style: none;
  margin: 0.1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.18rem 0.45rem;
}

.dc-list__item-product {
  list-style: none;
}

.dc-list__item-product-link {
  font-size: 0.78rem;
  color: #72d8ff;
  text-decoration: none;
}

.dc-list__item-product-link:hover,
.dc-list__item-product-link:focus-visible {
  text-decoration: underline;
  outline: none;
}

/* Thumb area */
.dc-list__item-thumb {
  flex: 0 0 auto;
  max-width: 90px;
}

.dc-list__item-thumb img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.55rem;
  object-fit: cover;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.65);
}

/* Specific section tones */
.dc-list__item--past .dc-list__item-inner {
  background: rgba(14, 14, 20, 0.95);
  opacity: 0.9;
}

.dc-list__item--future .dc-list__item-inner {
  background: rgba(16, 18, 26, 0.96);
}

/* Responsive list layout */
@media (max-width: 640px) {
  .dc-list__item-inner {
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .dc-list__item-thumb {
    max-width: 100%;
  }

  .dc-list__item-thumb img {
    max-height: 160px;
  }
}

/* ---------------------------------------------------------------------------
 * Popup
 * ------------------------------------------------------------------------- */

/**
 * .dc-popup-root lives inside .dc-block and is used as an anchor container for
 * the contextual discount popups. JS toggles .is-open and injects
 * .dc-discount-popup into it.
 *
 * IMPORTANT:
 * - Overlay plane aligned to the block's top-left origin,
 *   because JS positions popups using block-relative coordinates.
 * - Must not affect layout flow.
 * - Pointer-events stays "pass-through" so other triggers remain clickable;
 *   popup itself re-enables pointer-events.
 */
.dc-popup-root {
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  overflow: visible;
}

/* Main popup panel */
.dc-discount-popup {
  pointer-events: auto;
  min-width: 260px;
  max-width: 360px;
  max-height: min(60vh, 520px);
  overflow: auto;
  padding: 0.55rem 0.7rem 0.65rem;
  border-radius: 0.75rem;
  background: rgba(10, 10, 16, 0.96);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.18);
  color: #f5f5ff;
  font-size: 0.8rem;
}

/* Header (calendar template uses header + close; list template may not) */
.dc-discount-popup__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  padding-bottom: 0.4rem;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.dc-discount-popup__title {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
}

/* Close button (required by JS: .js-dc-popup-close) */
.dc-discount-popup__close {
  appearance: none;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(243, 243, 255, 0.92);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
  transition:
    background-color 0.12s ease,
    transform 0.12s ease,
    box-shadow 0.12s ease;
}

.dc-discount-popup__close:hover,
.dc-discount-popup__close:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(114, 216, 255, 0.35),
    0 10px 22px rgba(0, 0, 0, 0.6);
}

/* List-template fallback separator */
.dc-discount-popup hr {
  margin: 0.35rem 0 0.4rem;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.dc-discount-popup__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dc-discount-popup__list-item {
  margin-bottom: 0.22rem;
  line-height: 1.35;
}

.dc-discount-popup__label {
  font-weight: 500;
  margin-right: 0.25rem;
}

.dc-discount-popup__products {
  list-style: none;
  margin: 0.1rem 0 0;
  padding: 0;
}

.dc-discount-popup__product {
  margin: 0.05rem 0;
}

.dc-discount-popup__product-link {
  font-size: 0.78rem;
  color: #72d8ff;
  text-decoration: none;
}

.dc-discount-popup__product-link:hover,
.dc-discount-popup__product-link:focus-visible {
  text-decoration: underline;
  outline: none;
}

/* Image */
.dc-discount-popup__image {
  margin-top: 0.35rem;
}

.dc-discount-popup__image-link {
  display: block;
  text-decoration: none;
  border-radius: 0.55rem;
}

.dc-discount-popup__image-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(114, 216, 255, 0.4);
}

.dc-discount-popup__image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.55rem;
  object-fit: cover;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.16);
}

/* Actions row (calendar template uses "Details" link) */
.dc-discount-popup__actions {
  margin-top: 0.45rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

.dc-discount-popup__details-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(114, 216, 255, 0.12);
  color: #72d8ff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 0 0 1px rgba(114, 216, 255, 0.28);
  transition:
    transform 0.12s ease,
    background-color 0.12s ease,
    box-shadow 0.12s ease;
}

.dc-discount-popup__details-link:hover,
.dc-discount-popup__details-link:focus-visible {
  outline: none;
  transform: translateY(-1px);
  background: rgba(114, 216, 255, 0.16);
  box-shadow:
    0 0 0 1px rgba(114, 216, 255, 0.42),
    0 10px 22px rgba(0, 0, 0, 0.6);
}

/* Active popup modifier: JS adds it before positioning */
.dc-discount-popup--active {
  /* Positioning handled inline by JS (top/left relative to .dc-block). */
}

/* ---------------------------------------------------------------------------
 * Small utilities
 * ------------------------------------------------------------------------- */

/* Thin underline inside day cells with any events (used as subtle indicator) */
.dc-calendar__day--has-events::before {
  content: '';
  position: absolute;
  inset-inline: 0.4rem;
  bottom: 0.25rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffb44b, #ff7f4b);
  opacity: 0.6;
}

/* Slight scrollbars styling in calendar and list, optional */
.dc-calendar,
.dc-list {
  scrollbar-width: thin;
}

.dc-calendar::-webkit-scrollbar,
.dc-list::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}

.dc-calendar::-webkit-scrollbar-track,
.dc-list::-webkit-scrollbar-track {
  background: transparent;
}

.dc-calendar::-webkit-scrollbar-thumb,
.dc-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.45);
  border-radius: 999px;
}
/* ---------------------------------------------------------------------------
 * Fullscreen Details Modal (Details -> full-screen popup)
 * ------------------------------------------------------------------------- */

/**
 * Responsive overlay modal used by the small popup "Details" and "Image" actions.
 *
 * Goals (ticket discountcalender_detailsfullscreen2701 v1.4):
 * - Modal panel is centered and sized relative to viewport (NOT full-screen).
 * - No sticky header: header scrolls naturally with content.
 * - Image scales to popup width (no horizontal panning).
 * - "Details" link is hidden inside fullscreen (no recursion).
 */

html.dc-details-modal-open,
body.dc-details-modal-open {
  overflow: hidden;
}

.dc-details-modal {
  position: fixed;
  inset: 0;
  z-index: 10000; /* Must sit above .dc-popup-root (z-index: 50) */
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.dc-details-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.dc-details-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.dc-details-modal__panel {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2.4vw, 34px);
  overflow: auto;
}

/* Modal panel: responsive sizing (not fullscreen). */
.dc-details-modal .dc-discount-popup--fullscreen {
  box-sizing: border-box;
  width: min(860px, 92vw);
  max-width: 860px;
  max-height: 86vh;
  height: auto;
  min-width: 0;
  border-radius: 18px;
  padding: 1rem 1.15rem 1.2rem;
  font-size: 0.92rem;
  background: rgba(10, 10, 16, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65);
  overflow-y: auto;
  overflow-x: hidden;
  overflow-wrap: anywhere;
}

/* Fullscreen modal must not show Details link (prevents recursion). */
.dc-details-modal .dc-discount-popup__details-link {
  display: none !important;
}

/* Close button slightly larger in modal context. */
.dc-details-modal .dc-discount-popup__close {
  width: 40px;
  height: 40px;
}

/* Fullscreen modal image: fit popup width; height can grow. */
.dc-details-modal .dc-discount-popup__image {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.dc-details-modal .dc-discount-popup__image-link,
.dc-details-modal .dc-discount-popup__image-link--nolink {
  display: block;
  width: 100%;
  max-width: 100%;
}

.dc-details-modal .dc-discount-popup__image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* Roomier typography on larger screens */
@media (min-width: 768px) {
  .dc-details-modal .dc-discount-popup--fullscreen {
    padding: 1.25rem 1.45rem 1.5rem;
    font-size: 0.98rem;
  }
}

