.aprx-modal * {
  box-sizing: border-box;
}

.aprx-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  font-family: "DM Sans", sans-serif;
}

.aprx-modal.aprx-active {
  display: block;
}

.aprx-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 14, .62);
  backdrop-filter: blur(8px);
  animation: aprxFade .22s ease forwards;
}

.aprx-dialog {
  --aprx-accent-color: #3562aa;
  position: relative;
  width: min(1180px, calc(100% - 32px));
  max-height: 90vh;
  overflow-y: auto;
  margin: 5vh auto;
  padding: 34px;
  border-radius: 28px;
  background: #f7f2ea;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .32);
  animation: aprxIn .3s cubic-bezier(.22, 1, .36, 1) forwards;
}

.aprx-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(10px);
  color: #2b2b2b;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: transform .22s ease, background .22s ease, box-shadow .22s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.aprx-close:hover {
  background: #fff;
  transform: rotate(90deg) scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 0, 0, .14);
}

.aprx-close span {
  position: relative;
  top: -1px;
}

.aprx-header {
  text-align: center;
  margin-bottom: 28px;
}

.aprx-kicker {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--aprx-accent-color);
  font-weight: 700;
}

.aprx-title {
  margin: 0 0 20px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.08;
  color: #252525;
  letter-spacing: -.03em;
}

.aprx-state {
  width: min(420px, 100%);
  padding: 14px 48px 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, .14);
  background-color: rgba(255, 255, 255, .92);
  color: #222;
  font-size: 17px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  background-image:
    linear-gradient(45deg, transparent 50%, #3d3d3d 50%),
    linear-gradient(135deg, #3d3d3d 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 16px) calc(50% - 3px);
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

.aprx-state:hover,
.aprx-state:focus {
  background-color: #fff;
  border-color: rgba(0, 0, 0, .28);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, .045);
}

.aprx-duration-tabs {
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 18px auto 0;
  padding: 6px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .58);
  border: 1px solid rgba(0, 0, 0, .08);
}

.aprx-duration-tab {
  min-height: 58px;
  padding: 8px 16px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #595959;
  font-family: inherit;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.aprx-duration-tab:hover {
  color: #252525;
  background: rgba(255, 255, 255, .68);
}

.aprx-duration-tab:focus-visible {
  outline: 3px solid rgba(37, 37, 37, .24);
  outline-offset: 2px;
}

.aprx-duration-tab.aprx-active {
  color: #252525;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .1);
  transform: translateY(-1px);
}

.aprx-duration-label,
.aprx-duration-weeks {
  display: block;
}

.aprx-duration-label {
  font-size: 17px;
  line-height: 1.2;
  font-weight: 800;
}

.aprx-duration-weeks {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.2;
  color: #777;
}

.aprx-cards {
  display: block;
}

.aprx-pharmacy-group + .aprx-pharmacy-group {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid rgba(0, 0, 0, .1);
}

.aprx-pharmacy-heading {
  margin: 0 0 14px;
  color: #252525;
  font-family: Georgia, serif;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.2;
  font-weight: 400;
}

.aprx-pharmacy-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 22px;
}

.aprx-card {
  --aprx-card-color-start: #8a412f;
  --aprx-card-color-end: #633025;
  --aprx-card-shadow-rgb: 76, 37, 28;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 28px;
  border-radius: 22px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .16);
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, .13), transparent 26%),
    linear-gradient(145deg, var(--aprx-card-color-start), var(--aprx-card-color-end));
  box-shadow: 0 16px 38px rgba(var(--aprx-card-shadow-rgb), .24);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.aprx-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, .08), transparent 45%);
  opacity: .7;
  pointer-events: none;
}

.aprx-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, .3);
  box-shadow: 0 24px 54px rgba(var(--aprx-card-shadow-rgb), .34);
}

.aprx-card > * {
  position: relative;
  z-index: 1;
}

.aprx-theme-brown .aprx-card {
  --aprx-card-color-start: #8a412f;
  --aprx-card-color-end: #633025;
  --aprx-card-shadow-rgb: 76, 37, 28;
}

.aprx-theme-green .aprx-card {
  --aprx-card-color-start: #246b3c;
  --aprx-card-color-end: #123d26;
  --aprx-card-shadow-rgb: 18, 61, 38;
}

.aprx-theme-gold .aprx-card {
  --aprx-card-color-start: #c99c2f;
  --aprx-card-color-end: #9b741c;
  --aprx-card-shadow-rgb: 155, 116, 28;
}

.aprx-card-title {
  margin: 0 0 6px;
  font-family: Georgia, serif;
  font-size: clamp(24px, 2.2vw, 33px);
  line-height: 1.12;
  font-weight: 400;
}

.aprx-pharmacy {
  margin-bottom: 20px;
  font-size: 16px;
  color: rgba(255, 255, 255, .78);
}

.aprx-price-row {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.aprx-price {
  font-family: Georgia, serif;
  font-size: clamp(54px, 5vw, 76px);
  line-height: .9;
  font-weight: 400;
}

.aprx-term {
  font-size: 20px;
  color: rgba(255, 255, 255, .9);
  padding-bottom: 8px;
}

.aprx-payments {
  font-size: 15px;
  color: rgba(255, 255, 255, .72);
  margin-bottom: 12px;
}

.aprx-starter-price {
  margin-bottom: 18px;
  font-size: 15px;
  line-height: 1.4;
  color: rgba(255, 255, 255, .86);
}

.aprx-starter-price strong,
.aprx-prorated strong {
  color: #fff;
  font-weight: 800;
}

.aprx-divider {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .26);
  margin: 20px 0;
}

.aprx-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.aprx-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  font-size: 15.5px;
  line-height: 1.4;
  color: rgba(255, 255, 255, .9);
}

.aprx-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -1px;
  font-weight: 800;
  color: #f7f2ea;
}

.aprx-prorated {
  margin-top: auto;
  margin-bottom: 24px;
  font-size: 15px;
  line-height: 1.4;
  color: rgba(255, 255, 255, .9);
}

.aprx-card-btn,
.aprx-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 62px;
  border-radius: 12px;
  background: #f7f2ea;
  color: #202020 !important;
  text-decoration: none;
  font-size: 21px;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.aprx-card-btn::after,
.aprx-trigger::after {
  content: "→";
  font-size: 27px;
  transition: transform .2s ease;
}

.aprx-card-btn:hover,
.aprx-trigger:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, .16);
}

.aprx-card-btn:hover::after,
.aprx-trigger:hover::after {
  transform: translateX(4px);
}

.aprx-card-btn.aprx-disabled {
  opacity: .64;
  pointer-events: none;
}

.aprx-note {
  margin-top: 16px;
  padding: 13px 15px;
  border-radius: 12px;
  background: rgba(255, 248, 224, .95);
  color: #74401f;
  font-size: 14px;
  line-height: 1.45;
}

.aprx-empty,
.aprx-loading {
  grid-column: 1 / -1;
  padding: 36px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  color: #4a4a4a;
  text-align: center;
  font-size: 20px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .06);
}

.aprx-empty.aprx-error {
  background: rgba(255, 248, 224, .95);
  color: #74401f;
}

.aprx-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.aprx-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(0, 0, 0, .12);
  border-top-color: #3562aa;
  border-radius: 999px;
  animation: aprxSpin .75s linear infinite;
}

@keyframes aprxFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes aprxIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes aprxSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .aprx-pharmacy-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .aprx-dialog {
    width: calc(100% - 16px);
    margin: 2vh auto;
    padding: 24px 16px;
    border-radius: 22px;
  }

  .aprx-card {
    padding: 24px 20px;
  }

  .aprx-duration-tabs {
    margin-top: 14px;
  }

  .aprx-duration-tab {
    min-height: 54px;
    padding: 7px 10px;
  }

  .aprx-price-row {
    display: block;
  }

  .aprx-term {
    padding-bottom: 0;
    margin-top: 6px;
  }

  .aprx-card-btn,
  .aprx-trigger {
    min-height: 58px;
    font-size: 19px;
  }
}
