/* ============================================================
   Pricing Page Styles
   Converted from MUI makeStyles - colors, gradients, spacing
   kept identical to the original React component.
   ============================================================ */

:root {
  --color-primary: #7E3BF2;
  --color-divider: rgba(0, 0, 0, 0.12);
  --color-bg-paper: #ffffff;
  --color-bg-default: #f4f6f8;
  --color-bg-neutral: #f4f6f8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #212B36;
  background: #ffffff;
}

a {
  text-decoration: none;
}

/* ----- Layout containers (mirrors MUI Container + StyledContent) ----- */
.container {
  /* max-width: 1200px; */
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 600px) {
  .container {
    padding: 0;
  }
  .page-wrapper {
    padding: 0 24px;
  }
}

.styled-content {
  margin: auto;
  display: flex;
  justify-content: center;
  flex-direction: row;
  padding: 0;
  width: 100%;
  text-align: center;
  align-items: center;
}

/* ----- Page / hero ----- */
.page-wrapper {
  width: 100%;
  /* border-radius: 28px; */
  padding: 26px 0px 56px;
  display: block;
  background: radial-gradient(120% 120% at 50% 0%, #F3ECFE 0%, #FAF9FF 45%, #FFFFFF 100%);
}

@media (min-width: 768px) {
  .page-wrapper {
    padding: 26px 32px 72px;
  }
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #7E3BF2;
  background: rgba(126, 59, 242, 0.08);
  border: 1px solid rgba(126, 59, 242, 0.18);
  border-radius: 999px;
  padding: 6px 18px;
  margin-bottom: 18px;
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 12px 0;
  -webkit-background-clip: text;
  background-clip: text;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
}

.hero-pay-per-use {
  margin: 0 0 8px 0;
  font-size: 1.15rem;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgb(119, 113, 129);
}

.hero-subtitle {
  font-size: 1rem;
  font-weight: 400;
  color: #6B7280;
  margin: 0 auto 28px auto;
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: 1.125rem;
  }
}

.hero-badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ff8000;
  border-radius: 999px;
  padding: 8px 16px;
  box-shadow: 0px 4px 14px rgba(126, 59, 242, 0.06);
  background: var(--color-bg-paper);
  border: 1px solid var(--color-bg-paper);
}

/* ----- CTA / free trial button ----- */
.free-trial-section {
  margin: 24px 0;
}

.free-trial-btn {
  border-radius: 14px;
  padding: 12px 28px;
  font-weight: 700;
  text-transform: none;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary) 0%, rgb(127 10 154) 100%);
  box-shadow: 0px 10px 25px rgba(126, 59, 242, 0.3);
  transition: box-shadow 0.2s ease;
}

.free-trial-btn:hover {
  background: linear-gradient(135deg, var(--color-primary) 0%, #A876FF 100%);
  box-shadow: 0px 14px 30px rgba(126, 59, 242, 0.4);
}

.free-trial-btn .rocket-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.pill-section {
  margin-bottom: 16px;  
}

/* ----- Control bar (branches + duration) ----- */
.control-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border-radius: 20px;
  box-shadow: 0px 10px 30px rgba(99, 60, 198, 0.08);
  padding: 18px 24px;
  margin: 0 auto 24px auto;
  max-width: 640px;
  background: var(--color-bg-paper);
  border: 1px solid var(--color-bg-default);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-divider {
  width: 1px;
  height: 32px;
  background: #ECE5FB;
}

@media (max-width: 599px) {
  .control-divider {
    display: none;
  }
}

.control-label {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
}

.duration-label {
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.duration-label.active {
  color: var(--color-primary);
}

.save-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: #0E9F6E;
  background: rgba(14, 159, 110, 0.12);
  border-radius: 999px;
  padding: 3px 10px;
  margin-left: 6px;
  white-space: nowrap;
}

/* ----- Branches input ----- */
.branches-input {
  width: 100px;
  /* height: 25px; */
  padding: 5px;
  padding-right: 2px;
  font-weight: bold;
  border: 2px solid #6b7280;
  border-radius: 7px;
  font-size: 0.95rem;
  font-family: inherit;
}

.branches-input:focus {
  border: 2px solid var(--color-primary);
  outline-offset: 0;
  /* outline: 2px solid var(--color-primary);
  outline-offset: 1px; */
}

/* ----- IOS-style switch ----- */
.ios-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 26px;
  margin: 0 8px;
}

.ios-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ios-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #E9E9EA;
  border-radius: 26px;
  transition: background-color 0.2s ease;
}

.ios-switch-slider::before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.ios-switch input:checked + .ios-switch-slider {
  background-color: var(--color-primary);
}

.ios-switch input:checked + .ios-switch-slider::before {
  transform: translateX(16px);
}

/* ----- Plan cards grid (Desktop) ----- */
.desktop-view {
  display: none;
}

@media (min-width: 1200px) {
  .desktop-view {
    display: block;
    max-width: 1200px;
    margin: 0 auto;
  }
  .mobile-view {
    display: none !important;
  }
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: stretch;
}

.plan-card,
.features-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  background: var(--color-bg-paper);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0px 8px 24px rgba(31, 27, 51, 0.06);
}

.features-card {
  box-shadow: none;
}

.plan-card:hover {
  transform: translateY(-6px);
  box-shadow: 0px 20px 45px rgba(31, 27, 51, 0.12);
}

.plan-card-popular:hover {
  transform: translateY(-10px);
  box-shadow: 0px 24px 55px rgba(31, 27, 51, 0.22);
}

.outline-default {
  outline: 1px solid var(--color-primary);
  outline-offset: 3px;
}

.outline-popular {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* ----- Card header ----- */
.card-header {
  padding: 28px 24px 22px;
  position: relative;
  min-height: 212px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}

@media (max-width: 599px) {
  .card-header {
    min-height: 196px;
  }
}

.card-header.features-header {
  margin-bottom: 0;
  border-bottom: 1px solid var(--color-divider);
}

.card-header.gradient-default {
  background: linear-gradient(135deg, var(--color-primary) 0%, rgb(50, 41, 82) 100%);
  color: #fff;
}

.card-header.gradient-popular {
  background: linear-gradient(150deg, rgb(130 6 159) 0%, rgb(41 1 50) 100%);
  color: #fff;
}

.popular-ribbon-corner {
  position: absolute;
  top: 8px;
  right: 8px;
}

.popular-ribbon {
  background: linear-gradient(135deg, #FF7A59 0%, #E63946 100%);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 6px 14px;
  box-shadow: 0px 6px 16px rgba(230, 57, 70, 0.35);
  display: inline-block;
  margin-left: 4px;
}

.plan-name-label {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
  display: block;
}

.features-header-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0;
  display: block;
}

.features-header-subtitle {
  font-size: 0.9rem;
  color: #9C93AE;
  margin-top: 6px;
  display: block;
}

.features-header-subtitle.bold {
  font-weight: bold;
}

/* ----- Price block ----- */
.price-block {
  margin-top: 14px;
}

.old-price {
  font-size: 1rem;
  font-weight: 500;
  text-decoration: line-through;
  margin: 0px;
  opacity: 0.7;
  color: #fff;
  white-space: nowrap;
}

.save-price {
  font-size: 0.8rem;
  font-weight: 700;
  margin: 4px 0 6px 0;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 12px;
  background: rgb(3 255 0 / 18%);
  color: #5ede18;
  white-space: nowrap;
}

.new-price {
  font-size: 2rem;
  font-weight: 800;
  margin: 0px;
  padding-top: 0px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  justify-content: center;
  color: #fff;
  white-space: nowrap;
}

.per-month-label {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.85;
}

/* ----- Feature list ----- */
.features-list {
  list-style-type: none;
  text-align: left;
  margin: 0;
  padding: 0;
}

.feature-item-label,
.feature-item {
  display: flex;
  align-items: center;
  margin-top: 0px;
  min-height: 60px;
  padding: 10px 0;
  box-sizing: border-box;
  border-bottom: 1px solid var(--color-divider);
}

.feature-item-label {
  padding-left: 24px;
  padding-right: 24px;
}

.feature-item {
  justify-content: center;
}

.feature-item-label:last-child,
.feature-item:last-child {
  border-bottom: none;
}

.feature-text {
  font-size: 0.92rem;
  color: #3A3450;
}

.feature-value-text {
  margin-left: 12px;
  margin-right: 7px;
  font-weight: 700;
  font-size: 0.95rem;
}

.icon-circle {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-circle-check {
  background: rgba(14, 159, 110, 0.12);
}

.icon-circle-cross {
  background: rgb(221 63 63 / 14%);
}

.tick-icon {
  flex-shrink: 0;
  width: 0.95rem;
  height: 0.95rem;
  color: rgb(14 159 110);
  fill: rgb(14 159 110);
}

.cross-icon {
  flex-shrink: 0;
  width: 0.85rem;
  height: 0.85rem;
  color: rgb(178 9 9);
  fill: rgb(178 9 9);
}

/* ----- CTA button (inside cards) ----- */
.cta-button {
  width: 100%;
  border-radius: 14px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: none;
  box-shadow: none;
  border: none;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease;
}

.cta-button.empty {
  visibility: hidden;
  cursor: default;
  background: transparent;
}

.cta-button.gradient-default {
  background: linear-gradient(135deg, var(--color-primary) 0%, rgb(50, 41, 82) 100%);
}

.cta-button.gradient-default:hover {
  background: linear-gradient(135deg, rgb(50, 41, 82) 0%, var(--color-primary) 100%);
}

.cta-button.gradient-popular {
  background: linear-gradient(150deg, rgb(130 6 159) 0%, rgb(41 1 50) 100%);
}

.cta-button.gradient-popular:hover {
  background: linear-gradient(150deg, rgb(41 1 50) 0%, rgb(130 6 159) 100%);
}

.card-content-padding {
  padding: 16px;
  padding-top: 24px;
}

/* ----- Mobile Table Styles ----- */
.mobile-view {
  display: block;
  width: 100%;
  margin-top: 16px;
}

@media (min-width: 1200px) {
  .mobile-view {
    display: none;
  }
}

.mobile-table-card {
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0px 8px 24px rgba(31, 27, 51, 0.06);
  border: 1px solid #ECE5FB;
  background: var(--color-bg-paper);
}

.mobile-header-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 2px solid #ECE5FB;
}

.mobile-table-header-cell {
  padding: 20px 10px;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  border-right: 1px solid #ECE5FB;
}

.mobile-table-header-cell:last-child {
  border-right: none;
}

.mobile-table-header-cell.popular-cell {
  background-color: #423308;
  color: #fff;
  position: relative;
}

.mobile-popular-ribbon-wrap {
  position: relative;
  top: 0;
  right: 0;
  margin-top: -10px;
}

.mobile-popular-ribbon-wrap .popular-ribbon {
  font-size: 0.6rem;
}

.mobile-plan-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.mobile-plan-title.with-margin {
  margin-top: 12px;
}

.mobile-old-price {
  font-size: 0.7rem !important;
  font-weight: 500;
  text-decoration: line-through;
  margin: 4px 0;
  opacity: 0.7;
  white-space: nowrap;
}

.mobile-old-price.white {
  color: #fff;
}

.mobile-new-price {
  font-size: 0.875rem;
  font-weight: 700;
  margin: 4px 0;
  color: #637381;
}

.mobile-new-price.white {
  color: #fff;
}

.mobile-save-price {
  font-size: 0.6rem !important;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 12px;
  background: rgb(3 255 0 / 18%);
  color: #5ede18;
  white-space: nowrap;
  margin: 4px 0;
}

.mobile-save-price.light {
  color: #47a713 !important;
  background-color: rgb(18 235 15 / 18%) !important;
}

.mobile-pay-box {
  padding: 8px;
}

.mobile-pay-btn {
  text-transform: none;
  font-size: 0.75rem;
  padding: 6px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  color: #fff;
  font-weight: 600;
  font-family: inherit;
}

.mobile-pay-btn.gradient-default {
  background: linear-gradient(135deg, var(--color-primary) 0%, rgb(50, 41, 82) 100%);
}

.mobile-pay-btn.gradient-popular {
  background: linear-gradient(150deg, rgb(130 6 159) 0%, rgb(41 1 50) 100%);
}

.mobile-table-label-row {
  padding: 16px 24px;
  font-weight: 600;
  font-size: 1rem;
  border-bottom: 1px solid #ECE5FB;
  border-top: 1px solid #ECE5FB;
  text-align: left;
  background-color: #F9FAFB;
}

.mobile-value-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid #ECE5FB;
}

.mobile-value-row:last-child {
  border-bottom: none;
}

.mobile-value-cell {
  padding: 16px 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60px;
  box-sizing: border-box;
}

/* ----- Modal (Free trial) ----- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1300;
  padding: 16px;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: #fff;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0px 20px 60px rgba(31, 27, 51, 0.25);
  overflow: hidden;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-divider);
  margin: 0;
}

.modal-content {
  padding: 20px 24px;
  text-align: left;
}

.modal-content .modal-row {
  margin-bottom: 8px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--color-divider);
}

.modal-btn {
  border-radius: 10px;
  padding: 8px 20px;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.modal-btn.cancel {
  background: transparent;
  color: #637381;
}

.modal-btn.ok {
  background: linear-gradient(135deg, var(--color-primary) 0%, #A876FF 100%);
  color: #fff;
}

/* ----- Responsive tweaks ----- */
@media (max-width: 599px) {
  .hero-title {
    font-size: 1.7rem;
  }
  .container {
    padding: 0;
  }
  .control-bar {
    padding: 14px 16px;
  }
  .mobile-table-header-cell {
    padding: 14px 6px;
    font-size: 0.95rem;
  }
  .page-wrapper {
    padding: 0 12px;
  }
}
