/* ----------------------------------------------------------------------------------------
 * Author        : Prospera
 * File          : Package offers and subscriptions css
 * ----------------------------------------------------------------------------------------
 *
 * A package is a course of care bought up front, so the thing a client is
 * really choosing between is not a price — it is what they get and how many
 * times they get it. Every card therefore leads with a ledger of inclusions,
 * counted in the brand's display face, the same figures that mark dates on the
 * sessions thread. Price sits underneath as the consequence, not the headline.
 *
 * On My Packages this file rides on top of css/bookings.css and reuses its
 * account-area furniture (.bk-state, .bk-chip, .bk-drawer, .bk-btn, .bk-block)
 * so the two pages read as one place. On the home page it stands alone.
 *
 * Class prefix `pk-`.
 * -------------------------------------------------------------------------- */

.pk-scope {
  --pk-ink: var(--primary-color);
  --pk-accent: var(--accent-color);
  --pk-ground: #f2f7f7;
  --pk-surface: #ffffff;
  --pk-hair: rgba(13, 59, 102, 0.1);
  --pk-muted: rgba(13, 59, 102, 0.55);
}

.pk-scope [data-bk-figure] {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
}

.pk-scope :focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Buttons -------------------------------------------------------------- */

.pk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--default-font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease;
}

.pk-btn-go {
  background: var(--accent-color);
  color: #ffffff;
}

.pk-btn-go:hover,
.pk-btn-go:focus {
  background: var(--primary-color);
  color: #ffffff;
}

.pk-btn-quiet {
  background: transparent;
  color: var(--primary-color);
  border-color: rgba(13, 59, 102, 0.16);
}

.pk-btn-quiet:hover,
.pk-btn-quiet:focus {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.pk-btn[disabled],
.pk-btn--busy {
  opacity: 0.6;
  pointer-events: none;
}

/* --- The offer grid ------------------------------------------------------- */

.pk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.pk-card {
  display: flex;
  flex-direction: column;
  background: var(--pk-surface);
  border: 1px solid var(--pk-hair);
  border-radius: 22px;
  padding: 32px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease,
    transform 0.3s ease;
}

.pk-card:hover {
  border-color: var(--accent-color);
  box-shadow: 0 16px 40px rgba(13, 59, 102, 0.08);
  transform: translateY(-3px);
}

.pk-card--closed {
  opacity: 0.65;
}

.pk-card--closed:hover {
  transform: none;
  border-color: var(--pk-hair);
  box-shadow: none;
}

.pk-card-head {
  margin-bottom: 22px;
}

.pk-card-title {
  font-family: var(--accent-font);
  font-size: 26px;
  line-height: 1.25em;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.pk-card-text {
  font-size: 15px;
  line-height: 1.7em;
  color: var(--pk-muted);
  margin: 0;
}

/* --- The ledger of inclusions -------------------------------------------- */

.pk-items {
  list-style: none;
  margin: 0 0 26px;
  padding: 22px 0 0;
  border-top: 1px solid var(--pk-hair);
  flex: 1 1 auto;
}

.pk-item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 11px 0;
}

.pk-item + .pk-item {
  border-top: 1px dashed var(--pk-hair);
}

/* The count is the fact that decides the purchase, so it gets the display
   face and the weight — the same treatment as a date on the sessions thread. */
.pk-item-count {
  flex: 0 0 auto;
  min-width: 46px;
  font-family: var(--accent-font);
  font-size: 24px;
  line-height: 1;
  color: var(--primary-color);
}

.pk-item-times {
  font-family: var(--default-font);
  font-size: 13px;
  font-weight: 600;
  color: var(--pk-muted);
  margin-inline-start: 3px;
}

.pk-item-any {
  font-family: var(--default-font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-color);
}

.pk-item-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  color: var(--primary-color);
}

.pk-item-discount {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(47, 168, 160, 0.12);
  color: #1f7a74;
  font-size: 12px;
  font-weight: 600;
}

/* --- Price ---------------------------------------------------------------- */

.pk-card-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 22px;
  border-top: 1px solid var(--pk-hair);
}

.pk-price-figure {
  display: block;
  font-family: var(--accent-font);
  font-size: 32px;
  line-height: 1;
  color: var(--primary-color);
}

.pk-price-meta {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--pk-muted);
}

.pk-price-meta span + span::before {
  content: '\00b7';
  margin: 0 8px;
}

.pk-closed-note {
  font-size: 13px;
  color: var(--pk-muted);
}

/* --- Subscribe modal ------------------------------------------------------ */

.package-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 59, 102, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  overflow-y: auto;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.package-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.package-modal {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 20px 60px rgba(13, 59, 102, 0.3);
  transform: scale(0.94);
  transition: transform 0.3s ease;
}

.package-modal-overlay.active .package-modal {
  transform: scale(1);
}

.package-modal-close {
  position: absolute;
  inset-block-start: 18px;
  inset-inline-end: 18px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: var(--secondary-color);
  color: var(--primary-color);
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, color 0.3s ease,
    transform 0.3s ease;
  z-index: 2;
}

.package-modal-close:hover {
  background: var(--primary-color);
  color: #ffffff;
  transform: rotate(90deg);
}

.package-modal-head {
  flex: 0 0 auto;
  padding: 28px 32px 0;
}

.package-modal-head h2 {
  font-family: var(--accent-font);
  font-size: 24px;
  color: var(--primary-color);
  padding-inline-end: 46px;
}

.package-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 24px 32px;
}

.package-modal-foot {
  flex: 0 0 auto;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding: 20px 32px;
  border-top: 1px solid var(--pk-hair);
}

.pk-confirm-title {
  font-family: var(--accent-font);
  font-size: 22px;
  color: var(--primary-color);
  margin-bottom: 4px;
}

.pk-confirm .pk-items {
  margin-bottom: 20px;
}

.pk-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--pk-hair);
}

.pk-total dt {
  font-size: 14px;
  font-weight: 400;
  color: var(--pk-muted);
}

.pk-total dd {
  margin: 0;
  font-family: var(--accent-font);
  font-size: 28px;
  line-height: 1;
  color: var(--primary-color);
}

.pk-confirm-note {
  font-size: 13px;
  line-height: 1.65em;
  color: var(--pk-muted);
  margin: 0 0 24px;
}

/* --- Payment choice ------------------------------------------------------- */

.pk-pay-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pk-pay-legend {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pk-muted);
  margin: 0 0 4px;
}

.pk-pay {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--pk-hair);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.pk-pay:hover {
  border-color: var(--accent-color);
}

.pk-pay:has(input:checked) {
  border-color: var(--accent-color);
  background: rgba(47, 168, 160, 0.07);
}

.pk-pay--off {
  opacity: 0.55;
  cursor: not-allowed;
}

.pk-pay--off:hover {
  border-color: var(--pk-hair);
}

.pk-pay input {
  margin: 3px 0 0;
  accent-color: var(--accent-color);
  flex: 0 0 auto;
}

.pk-pay-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.pk-pay-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-color);
}

.pk-pay-note {
  font-size: 13px;
  line-height: 1.5em;
  color: var(--pk-muted);
}

/* --- Done / error --------------------------------------------------------- */

.pk-done {
  text-align: center;
  padding: 20px 0 10px;
}

.pk-done i {
  display: block;
  font-size: 42px;
  color: var(--accent-color);
  margin-bottom: 20px;
}

.pk-done h3 {
  font-family: var(--accent-font);
  font-size: 26px;
  color: var(--primary-color);
  margin-bottom: 12px;
}

.pk-done p {
  font-size: 15px;
  line-height: 1.7em;
  color: var(--pk-muted);
  max-width: 380px;
  margin: 0 auto 26px;
}

.pk-error {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(230, 87, 87, 0.09);
  color: #b84a4a;
  font-size: 14px;
  line-height: 1.6em;
}

.pk-error i {
  margin-top: 3px;
}

.pk-error p {
  margin: 0;
}

/* --- My Packages: rows ---------------------------------------------------- */

.pk-group-heading {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pk-muted);
  margin: 0 0 18px;
}

#subDone {
  margin-top: 40px;
  padding-top: 34px;
  border-top: 1px solid var(--pk-hair);
}

.pk-row {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  margin-bottom: 14px;
  padding: 22px 26px;
  background: var(--pk-surface);
  border: 1px solid var(--pk-hair);
  border-radius: 16px;
  font-family: var(--default-font);
  text-align: start;
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.pk-row:hover,
.pk-row:focus-visible {
  border-color: var(--accent-color);
  box-shadow: 0 10px 30px rgba(13, 59, 102, 0.08);
}

.pk-row-main {
  flex: 1 1 auto;
  min-width: 0;
}

.pk-row-title {
  display: block;
  font-size: 17px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pk-row-meta {
  display: block;
  font-size: 13px;
  color: var(--pk-muted);
  line-height: 1.6em;
}

.pk-row-meta span + span::before {
  content: '\00b7';
  margin: 0 8px;
}

.pk-row-chevron {
  flex: 0 0 auto;
  font-size: 14px;
  color: var(--pk-muted);
  transition: transform 0.3s ease, color 0.3s ease;
}

.pk-row:hover .pk-row-chevron {
  color: var(--accent-color);
  transform: translateX(3px);
}

body.rtl .pk-row:hover .pk-row-chevron {
  transform: translateX(-3px);
}

#subDone .pk-row {
  background: transparent;
  border-style: dashed;
}

#subDone .pk-row-title {
  color: var(--pk-muted);
  font-weight: 500;
}

#subDone .pk-row:hover {
  background: var(--pk-surface);
  border-style: solid;
}

/* --- Usage meters --------------------------------------------------------- */

.pk-usage {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--pk-hair);
}

.pk-usage:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.pk-usage-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-color);
}

.pk-meter {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.pk-meter-track {
  display: block;
  width: 96px;
  height: 6px;
  border-radius: 999px;
  background: rgba(13, 59, 102, 0.09);
  overflow: hidden;
}

.pk-meter-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent-color);
  transition: width 0.4s ease;
}

/* Nothing left to use — the bar says so in the same colour as an ended state
   elsewhere, rather than reading as a full, healthy meter. */
.pk-meter-fill--spent {
  background: var(--gold-color);
}

.pk-meter-text {
  flex: 0 0 auto;
  min-width: 52px;
  font-size: 13px;
  font-weight: 600;
  color: var(--pk-muted);
  text-align: end;
}

.pk-notice {
  margin: 0 0 26px;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(212, 162, 76, 0.12);
  color: #8a6420;
  font-size: 14px;
  line-height: 1.65em;
}

/* --- Home page section ---------------------------------------------------- */

.pk-section {
  padding: 100px 0;
  background: var(--pk-ground);
}

.pk-section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 50px;
}

.pk-section-head h2 {
  font-family: var(--accent-font);
  font-size: 42px;
  line-height: 1.2em;
  color: var(--primary-color);
  margin-bottom: 16px;
}

.pk-section-head p {
  font-size: 16px;
  line-height: 1.75em;
  color: var(--pk-muted);
  margin: 0;
}

.pk-section-loading {
  text-align: center;
  padding: 50px 0;
}

/* --- Responsive ----------------------------------------------------------- */

@media only screen and (max-width: 991px) {
  .pk-section {
    padding: 70px 0;
  }

  .pk-section-head h2 {
    font-size: 32px;
  }
}

@media only screen and (max-width: 767px) {
  .pk-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .pk-card {
    padding: 24px 22px;
  }

  .pk-card-title {
    font-size: 22px;
  }

  .pk-card-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .pk-card-foot .pk-btn {
    width: 100%;
  }

  .package-modal-head,
  .package-modal-body,
  .package-modal-foot {
    padding-left: 20px;
    padding-right: 20px;
  }

  .package-modal-foot .pk-btn {
    flex: 1 1 auto;
  }

  .pk-row {
    padding: 18px 18px;
    gap: 14px;
  }

  .pk-usage {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .pk-meter {
    width: 100%;
  }

  .pk-meter-track {
    flex: 1 1 auto;
    width: auto;
  }
}

@media only screen and (max-width: 575px) {
  .pk-row {
    flex-wrap: wrap;
  }

  .pk-row-main {
    flex: 1 1 100%;
  }

  .pk-row-chevron {
    margin-inline-start: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pk-card,
  .pk-btn,
  .pk-row,
  .pk-meter-fill,
  .package-modal,
  .package-modal-overlay {
    transition-duration: 0.001ms !important;
  }
}
