/* ==========================================================================
   Service Page — Offer Details, Interactive Plan Picker & Compare Modal
   ========================================================================== */

.offer-page {
  padding-block: clamp(18px, 2.6vw, 34px) clamp(48px, 6vw, 88px);
}

.offer-page .breadcrumb {
  margin: 0 0 18px;
}

.offer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-bottom: clamp(20px, 2.8vw, 32px);
}

.offer-heading-main {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
}

.offer-heading h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.9rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.offer-category {
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0 0 6px;
  color: #b7c9bb;
}

.offer-brand {
  display: grid;
  place-items: center;
  flex: none;
  width: clamp(66px, 7.6vw, 96px);
  aspect-ratio: 1;
  border-radius: 24%;
  background: var(--brand-bg);
}

.offer-brand img {
  width: 58%;
  height: 58%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.offer-heading-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.offer-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid #354439;
  background: rgba(255, 255, 255, 0.03);
  color: #d6e2d8;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.offer-action-btn:hover {
  background: #222e25;
  border-color: #546c5a;
  color: var(--text);
}

.offer-action-btn[aria-pressed="true"] {
  background: var(--mint-soft);
  border-color: var(--mint-border);
  color: var(--mint);
}

.offer-action-btn[aria-pressed="true"] svg {
  fill: currentColor;
}

.offer-action-btn svg {
  width: 18px;
  height: 18px;
}

/* Main two-column workspace */
.offer-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}

.offer-buy {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 104px;
}

.offer-buy-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 16px;
}

.offer-buy-heading h2 {
  margin: 0;
}

.compare-trigger {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  border: 1px solid #bfd1bf;
  border-radius: 10px;
  padding: 6px 12px;
  background: #ffffff;
  color: #21462e;
  font-weight: 600;
  font-size: 0.84rem;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.compare-trigger:hover {
  background: #e3f0e1;
  border-color: #8eb395;
}

.compare-trigger svg {
  width: 16px;
  height: 16px;
}

/* Quick plan filter chips (for services with many plans) */
.plan-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.plan-filter-chip {
  min-height: 36px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid #ccd9cb;
  background: #ffffff;
  color: #465b4c;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.plan-filter-chip:hover:not(.active) {
  border-color: #9ab59e;
  color: var(--ink);
}

.plan-filter-chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.offer-buy .plan-field {
  margin: 0 0 18px;
}

.offer-buy .plan-list.is-scrollable {
  max-height: clamp(216px, 25vh, 300px);
  overflow-y: auto;
  padding: 2px 4px 4px 2px;
  scrollbar-width: thin;
  scrollbar-color: #b7c8b8 transparent;
}

.offer-buy .purchase-foot {
  font-size: 0.86rem;
  text-align: center;
}

.offer-buy .purchase-foot a {
  justify-content: center;
}

/* Left details panel */
.offer-details {
  grid-column: 1;
  grid-row: 1;
  background: var(--panel);
  border: 1px solid #324036;
  border-radius: 24px;
  padding: clamp(22px, 3vw, 38px);
  overflow-wrap: anywhere;
}

.offer-details h2 {
  font-size: clamp(1.5rem, 2.35vw, 2.2rem);
  letter-spacing: -0.025em;
  margin: 0 0 22px;
  line-height: 1.22;
}

.offer-details h3 {
  font-size: 1.05rem;
  letter-spacing: -0.015em;
  margin: 24px 0 12px;
  color: var(--text);
}

.offer-facts {
  margin: 0;
  border-block: 1px solid #334237;
  padding-block: 12px;
}

.offer-facts div {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  align-items: baseline;
  gap: 16px;
  padding: 7px 0;
}

.offer-facts dt {
  color: #a1b3a5;
  font-size: 0.875rem;
}

.offer-facts dd {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 600;
  color: #edf4ee;
}

.offer-facts dd.fact-auto {
  color: var(--mint);
}

.offer-facts dd.fact-warn {
  color: var(--warn-text);
}

/* Rich formatted offer description */
.plan-details {
  display: grid;
  gap: 12px;
  font-size: 0.97rem;
  line-height: 1.72;
  color: #c3d0c5;
}

.plan-details p {
  margin: 0;
  color: inherit;
}

.offer-desc-list {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 6px;
}

.offer-desc-list li {
  padding-left: 2px;
}

.offer-desc-list li::marker {
  color: var(--mint);
}

.offer-desc-warn {
  padding: 13px 16px;
  border-radius: 13px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* Compare modal */
.modal.compare-modal {
  width: min(720px, calc(100% - 28px));
  max-height: calc(100dvh - 32px);
  padding: clamp(20px, 3vw, 32px);
  color-scheme: dark;
}

.compare-modal .modal-head {
  margin-bottom: 18px;
}

.compare-modal .modal-head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3.6vw, 1.95rem);
}

.compare-pickers {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.offer-picker-label {
  display: grid;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #b7c8bb;
  min-width: 0;
}

.compare-pickers .custom-select {
  height: 48px;
}

.compare-swap {
  width: 44px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid #415546;
  background: #202d24;
  color: #cfe0d2;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.compare-swap:hover {
  background: #2b3d30;
  border-color: var(--mint-border);
  color: var(--mint);
}

.compare-swap svg {
  width: 18px;
  height: 18px;
}

.compare-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  margin: 18px 0 14px;
  color: #edf6ed;
  text-align: left;
  border: 1px solid #3f5044;
  border-radius: 15px;
  overflow: hidden;
}

.compare-table td,
.compare-table th {
  overflow-wrap: anywhere;
  padding: 10px 14px;
  vertical-align: top;
  line-height: 1.45;
  width: 50%;
  font-size: 0.94rem;
}

.compare-table th {
  background: #223026;
  padding-block: 14px;
  font-weight: 700;
}

.compare-table tr > :nth-child(2) {
  border-inline-start: 1px solid #3f5044;
}

.compare-table .compare-key td {
  font-size: 0.8rem;
  font-weight: 600;
  color: #a6b9ab;
  padding-bottom: 2px;
  border-top: 1px solid #313e35;
}

.compare-best {
  color: var(--mint);
  font-weight: 700;
}

.compare-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--mint-soft);
  border: 1px solid var(--mint-border);
  color: var(--mint);
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
}

.compare-choose {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: var(--mint);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.875rem;
  transition: background 0.18s ease;
}

.compare-choose:hover {
  background: var(--mint-bright);
}

.compare-choose.is-current {
  background: #283a2d;
  color: var(--mint);
  border: 1px solid var(--mint-border);
}

.compare-note {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.6;
  color: #9cb0a1;
}

@media (max-width: 860px) {
  .offer-workspace {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .offer-buy,
  .offer-details {
    grid-column: auto;
    grid-row: auto;
    position: static;
  }

  .offer-buy .plan-list.is-scrollable {
    max-height: 300px;
  }
}

@media (max-width: 680px) {
  .offer-page .breadcrumb {
    margin-bottom: 20px;
  }

  .offer-heading {
    gap: 14px;
  }

  .offer-heading-main {
    gap: 14px;
  }

  .compare-pickers {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .compare-swap {
    width: 100%;
    height: 40px;
  }

  .compare-table td,
  .compare-table th {
    padding-inline: 10px;
    font-size: 0.88rem;
  }
}

@media (max-width: 425px) {
  .offer-heading h1 {
    font-size: 2.25rem;
    overflow-wrap: anywhere;
  }

  .offer-facts div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}
