/* === LL_FILE_START ===
 * File name: promo-calendar.css
 * Description: Styles for promo calendar modal UI (months grid + payment section + JS-positioned floating total box).
 */

/* -------------------------------------------------------------------------
 * Base
 * ------------------------------------------------------------------------- */

.ll-promo-wrap {
  padding: 14px;
}

/* -------------------------------------------------------------------------
 * Top bar (desktop/tablet)
 * ------------------------------------------------------------------------- */

.ll-promo-top {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

/* Left column */
.ll-promo-intro {
  flex: 1 1 auto;
  min-width: 300px;
}

/* Right column */
.ll-promo-right {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex: 0 0 auto;
}

/* Boxes */
.ll-promo-price,
.ll-promo-total {
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}

.ll-promo-total-label {
  text-align: left;
}

/* -------------------------------------------------------------------------
 * Sub hints
 * ------------------------------------------------------------------------- */

.ll-promo-sub {
  margin: 10px 0 12px;
}

.ll-promo-hint {
  font-size: 13px;
  opacity: 0.85;
}

.ll-promo-hint-green {
  margin-bottom: 4px;
  font-weight: 700;
  opacity: 1;
}

/* -------------------------------------------------------------------------
 * Calendars grid
 * ------------------------------------------------------------------------- */

.ll-promo-calendars {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 14px;
}

/* -------------------------------------------------------------------------
 * Month card
 * ------------------------------------------------------------------------- */

.ll-promo-month {
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

.ll-promo-month.is-hidden {
  display: none;
}

.ll-promo-month-title {
  margin-bottom: 8px;
  font-weight: 700;
}

.ll-promo-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.ll-promo-dow {
  font-size: 12px;
  text-align: center;
  opacity: 0.6;
}

/* -------------------------------------------------------------------------
 * Day cells
 * ------------------------------------------------------------------------- */

.ll-promo-cell {
  position: relative;
  padding: 8px 0;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  text-align: center;
  cursor: pointer;
  user-select: none;
}

.ll-promo-cell input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ll-promo-daynum {
  font-size: 14px;
  font-weight: 600;
}

.ll-promo-cell:hover {
  border-color: #94a3b8;
}

.ll-promo-empty {
  border: none;
  background: transparent;
}

/* Disabled states */
.ll-promo-cell.is-disabled {
  cursor: not-allowed;
}

.ll-promo-cell.is-disabled:not(.is-booked) {
  opacity: 0.35;
  background: #f8fafc;
}

/* Booked (paid) */
.ll-promo-cell.is-booked {
  cursor: not-allowed;
  opacity: 1;
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.ll-promo-cell.is-booked .ll-promo-daynum {
  color: #fff;
}

/* Selected */
.ll-promo-cell.is-checked {
  border-color: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.15);
}

/* -------------------------------------------------------------------------
 * View more
 * ------------------------------------------------------------------------- */

.ll-promo-viewmore-row {
  margin-top: 10px;
}

.ll-promo-viewmore {
  cursor: pointer;
  text-decoration: underline;
}

/* -------------------------------------------------------------------------
 * Payment box
 * ------------------------------------------------------------------------- */

.ll-promo-paybox {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

.ll-promo-paybox-title {
  margin-bottom: 10px;
  font-weight: 700;
}

.ll-promo-selected-wrap {
  margin: 0 0 12px;
}

.ll-promo-selected-title {
  margin-bottom: 6px;
  font-weight: 700;
}

.ll-promo-selected-list {
  margin: 0;
  padding-left: 18px;
}

.ll-promo-selected-total {
  margin-top: 8px;
  font-weight: 700;
}

.ll-promo-hide {
  display: none !important;
}

/* Hide the top bar once payment flow starts */
.ll-promo-wrap.is-payment-mode .ll-promo-top {
  display: none !important;
}

.ll-promo-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ll-promo-total .ll-promo-pay {
  margin-top: 0;          /* kill the old rule */
  white-space: nowrap;
}

.ll-promo-total-value {
  line-height: 1;
}


/* -------------------------------------------------------------------------
 * Mobile: bottom-fixed bar + single-column months
 * ------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .ll-promo-calendars {
    grid-template-columns: 1fr;
  }

  /* Make room for the fixed bottom bar */
  .ll-promo-wrap {
    padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px));
  }

  /* Bottom-fixed bar on mobile */
  .ll-promo-top {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 10000;

    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;

    flex-direction: row;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
  }

  /* Make the two boxes behave like inline blocks inside the bar */
  .ll-promo-price,
  .ll-promo-total {
    min-width: 0;
    width: auto;
    border: none;
    padding: 0;
    background: transparent;
  }

  .ll-promo-total {
    text-align: right;
  }

  /* IMPORTANT: kill JS floating on mobile */
  .ll-promo-total.ll-promo-total-floating {
    position: static !important;
    top: auto !important;
    right: auto !important;
    width: auto !important;
  }
}

.ll-promo-em {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}
