/* =========================================================
   EasyBookz Pricing Calculator
   File: public/css/pricing.css
   ========================================================= */

:root {
    --pricing-ink: #0f172a;
    --pricing-muted: #64748b;
    --pricing-blue: #2563eb;
    --pricing-blue-dark: #1d4ed8;
    --pricing-blue-soft: #eff6ff;
    --pricing-border: #e2e8f0;
    --pricing-surface: #ffffff;
    --pricing-background: #f4f7fa;
    --pricing-warning: #d97706;
    --pricing-warning-bg: #fffbeb;
    --pricing-danger: #b42318;
    --pricing-radius: 16px;
    --pricing-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

/* Base */

.pricing-page {
  color: var(--pricing-ink);
  background: var(--pricing-background);
}

.pricing-page *,
.pricing-page *::before,
.pricing-page *::after {
  box-sizing: border-box;
}

.pricing-page button,
.pricing-page input,
.pricing-page select,
.pricing-page textarea {
  font: inherit;
}

.pricing-container {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

/* Hero */

.pricing-hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 76px;
  color: #ffffff;
  background:
    radial-gradient(
      circle at 82% 15%,
      rgba(59, 130, 246, 0.22),
      transparent 32%
    ),
    linear-gradient(120deg, #0f172a 0%, #1e3a8a 58%, #1d4ed8 100%);
}

.pricing-hero::after {
  position: absolute;
  right: -110px;
  bottom: -260px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.pricing-hero .pricing-container {
  position: relative;
  z-index: 1;
}

.pricing-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  color: #bfdbfe;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pricing-hero .eyebrow::before {
  width: 24px;
  height: 2px;
  background: #60a5fa;
  content: "";
}

.pricing-hero h1 {
  max-width: 760px;
  margin: 0;
  color: #ffffff;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.12;
}

.pricing-hero p {
  max-width: 650px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  line-height: 1.75;
}

/* Main layout */

.pricing-calculator-section {
  padding: 54px 0 88px;
}

.pricing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  align-items: start;
  gap: 28px;
}

.pricing-main {
  display: grid;
  min-width: 0;
  gap: 22px;
}

/* Cards */

.pricing-card,
.summary-card {
  border: 1px solid var(--pricing-border);
  border-radius: var(--pricing-radius);
  background: var(--pricing-surface);
  box-shadow: var(--pricing-shadow);
}

.pricing-card {
  padding: 30px;
}

.pricing-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 27px;
}

.step-number {
  display: inline-flex;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid #bfdbfe;
  border-radius: 13px;
  color: var(--pricing-blue);
  background: var(--pricing-blue-soft);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.pricing-section-heading h2 {
  margin: 1px 0 6px;
  color: var(--pricing-ink);
  font-family: "Manrope", sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.35;
}

.pricing-section-heading p {
  margin: 0;
  color: var(--pricing-muted);
  font-size: 0.91rem;
  line-height: 1.6;
}

/* Form grid */

.pricing-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 21px 18px;
}

.form-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.form-field label {
  color: #334155;
  font-size: 0.85rem;
  font-weight: 700;
}

.form-field label span {
  color: #84908b;
  font-size: 0.8rem;
  font-weight: 500;
}

.form-field input,
.form-field select,
.form-field textarea {
  display: block;
  width: 100%;
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  outline: none;
  color: var(--pricing-ink);
  background-color: #ffffff;
  font-size: 0.92rem;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.form-field input,
.form-field select {
  min-height: 48px;
  padding: 0 13px;
}

.form-field select {
  cursor: pointer;
}

.form-field textarea {
  min-height: 112px;
  padding: 13px;
  resize: vertical;
  line-height: 1.55;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #94a3b8;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--pricing-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.11);
}

.form-field small {
  color: #64748b;
  font-size: 0.77rem;
  line-height: 1.5;
}

/* Package selection */

.package-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.package-option {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 190px;
  padding: 20px;
  border: 1px solid var(--pricing-border);
  border-radius: 14px;
  background: #ffffff;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.package-option:hover {
  border-color: #93c5fd;
  transform: translateY(-2px);
}

.package-option:has(input:checked) {
  border-color: var(--pricing-blue);
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}

.package-option > input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 12px 0 0;
  accent-color: var(--pricing-blue);
  cursor: pointer;
}

.package-option-content {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
}

.package-name {
  margin-bottom: 8px;
  color: var(--pricing-ink);
  font-family: "Manrope", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
}

.package-description {
  color: var(--pricing-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.package-scope {
  margin-top: 12px;
  color: #475569;
  font-size: 0.8rem;
  line-height: 1.5;
}

.package-price,
.package-price-note {
  margin-top: auto;
  padding-top: 16px;
  color: var(--pricing-blue);
  font-size: 0.94rem;
  font-weight: 800;
}

.package-price small {
  color: var(--pricing-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.package-price-note {
  color: #64736b;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.5;
}

.pricing-helper {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 9px;
  color: #475569;
  background: #f8fafc;
  font-size: 0.82rem;
  line-height: 1.6;
}

/* Additional services */

.service-groups {
  display: grid;
  gap: 24px;
}

.service-group + .service-group {
  padding-top: 22px;
  border-top: 1px solid #e2e8f0;
}

.service-group h3 {
  margin: 0 0 13px;
  color: #334155;
  font-family: "Manrope", sans-serif;
  font-size: 0.93rem;
  font-weight: 800;
}

.service-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.service-option {
  display: flex;
  align-items: flex-start;
  min-width: 0;
  gap: 11px;
  padding: 14px;
  border: 1px solid #e5ebe7;
  border-radius: 11px;
  background: #ffffff;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
}

.service-option:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}

.service-option:has(input:checked) {
  border-color: #60a5fa;
  background: #eff6ff;
}

.service-option input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: var(--pricing-blue);
  cursor: pointer;
}

.service-option-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.service-name {
  color: #334155;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.4;
}

.service-description {
  color: #64748b;
  font-size: 0.76rem;
  line-height: 1.5;
}

.service-meta {
  color: #94a3b8;
  font-size: 0.71rem;
  line-height: 1.45;
}

/* Form actions */

.pricing-form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 4px 0;
}

.button-primary {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 27px;
  border: 1px solid var(--pricing-blue);
  border-radius: 10px;
  color: #ffffff;
  background: var(--pricing-blue);
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.button-primary:hover {
  border-color: var(--pricing-blue-dark);
  background: var(--pricing-blue-dark);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.18);
  transform: translateY(-1px);
}

.button-primary:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  outline-offset: 3px;
}

.button-primary:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.form-message {
  margin: 0;
  color: var(--pricing-muted);
  font-size: 0.83rem;
  line-height: 1.5;
}

.form-message.is-error {
  color: var(--pricing-danger);
}

.form-message.is-success {
  color: var(--pricing-blue);
}

/* Sticky estimate panel */

.pricing-summary {
  position: sticky;
  top: 24px;
  min-width: 0;
}

.summary-card {
  overflow: hidden;
  padding: 25px;
}

.summary-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--pricing-blue);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.summary-card > h2 {
  margin: 0;
  color: var(--pricing-ink);
  font-family: "Manrope", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.summary-intro {
  margin: 11px 0 22px;
  color: var(--pricing-muted);
  font-size: 0.83rem;
  line-height: 1.65;
}

.estimate-loading {
  margin: 18px 0;
  padding: 13px;
  border-radius: 9px;
  color: #475569;
  background: #f1f6f2;
  font-size: 0.83rem;
}

.summary-total-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 17px;
  padding: 20px;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
}

.summary-total-block span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.77rem;
  font-weight: 600;
}

.summary-total-block strong {
  color: #ffffff;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.summary-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.5;
}

.summary-row strong {
  flex: 0 0 auto;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: right;
}

.summary-row-emphasis {
  margin-top: 4px;
  padding: 15px 0;
  border-bottom: 0;
  color: var(--pricing-ink);
  font-weight: 800;
}

.summary-row-emphasis strong {
  color: var(--pricing-blue);
  font-size: 0.95rem;
}

.estimate-status {
  margin: 10px 0 18px;
  padding: 11px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  color: #1e40af;
  background: #eff6ff;
  font-size: 0.78rem;
  line-height: 1.55;
}

.estimate-status:empty {
  display: none;
}

.estimate-status.is-warning {
  border-color: #f0d7a8;
  color: var(--pricing-warning);
  background: var(--pricing-warning-bg);
}

.estimate-status.is-error {
  border-color: #fecaca;
  color: var(--pricing-danger);
  background: #fef2f2;
}

/* Summary detail lists */

.summary-detail-section {
  margin-top: 23px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.summary-detail-section h3 {
  margin: 0 0 12px;
  color: #334155;
  font-family: "Manrope", sans-serif;
  font-size: 0.83rem;
  font-weight: 800;
}

.summary-detail-section ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.summary-detail-section li {
  position: relative;
  padding-left: 17px;
  color: #64748b;
  font-size: 0.77rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.summary-detail-section li::before {
  position: absolute;
  top: 0.48em;
  left: 1px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #60a5fa;
  content: "";
}

#warningsSection li::before {
  background: #d49b42;
}

#exclusionsList li::before {
  background: #94a3b8;
}

.summary-disclaimer,
.summary-tax-note {
  margin: 22px 0 0;
  color: #94a3b8;
  font-size: 0.71rem;
  line-height: 1.65;
}

.summary-tax-note {
  margin-top: 9px;
}

/* Empty state */

.estimate-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 15px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  text-align: center;
}

.summary-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 43px;
  height: 43px;
  margin-bottom: 13px;
  border-radius: 50%;
  color: var(--pricing-blue);
  background: var(--pricing-blue-soft);
  font-size: 1.1rem;
  font-weight: 800;
}

.estimate-empty p {
  max-width: 245px;
  margin: 0;
  color: #64748b;
  font-size: 0.79rem;
  line-height: 1.6;
}

/* Hidden attributes should always work */

.pricing-page [hidden] {
  display: none !important;
}

/* Responsive */

@media (max-width: 1050px) {
  .pricing-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
  }

  .pricing-card {
    padding: 25px;
  }

  .summary-card {
    padding: 22px;
  }
}

@media (max-width: 850px) {
  .pricing-hero {
    padding: 70px 0 62px;
  }

  .pricing-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .pricing-summary {
    position: static;
    grid-row: 1;
  }

  .summary-card {
    padding: 25px;
  }

  .pricing-main {
    grid-row: 2;
  }
}

@media (max-width: 600px) {
  .pricing-container {
    width: min(100% - 32px, 520px);
  }

  .pricing-hero {
    padding: 56px 0 50px;
  }

  .pricing-hero h1 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .pricing-hero p {
    margin-top: 16px;
    font-size: 0.93rem;
  }

  .pricing-calculator-section {
    padding: 28px 0 54px;
  }

  .pricing-main {
    gap: 15px;
  }

  .pricing-card {
    padding: 21px 17px;
    border-radius: 14px;
  }

  .pricing-section-heading {
    gap: 12px;
    margin-bottom: 22px;
  }

  .step-number {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: 0.72rem;
  }

  .pricing-section-heading h2 {
    font-size: 1.08rem;
  }

  .pricing-section-heading p {
    font-size: 0.82rem;
  }

  .pricing-form-grid,
  .package-options,
  .service-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .package-option {
    min-height: 0;
    padding: 17px;
  }

  .package-price,
  .package-price-note {
    margin-top: 13px;
  }

  .service-group + .service-group {
    padding-top: 18px;
  }

  .service-option {
    padding: 13px;
  }

  .pricing-form-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .button-primary {
    width: 100%;
  }

  .form-message {
    text-align: center;
  }

  .summary-card {
    padding: 21px 18px;
    border-radius: 14px;
  }

  .summary-total-block {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pricing-page *,
  .pricing-page *::before,
  .pricing-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}