/**
 * GravityForms pricing plan radio button cards.
 *
 * Applied to any GravityForms radio field whose choices are rendered by
 * GravityFormsPricingPlans::renderChoiceMarkup().  The field's CSS class
 * (set in GravityForms field settings) must be "pricing-plans" for the
 * layout rules to apply.
 *
 * Each radio choice is rendered as a <li> containing a hidden
 * <input type="radio"> and a <label> wrapping a .pricing-plan-card block.
 * Clicking anywhere on the card selects the option.
 */

/* --------------------------------------------------------------------------
   Field-level wrapper
   Horizontal column layout is handled by GF's enableDisplayInColumns setting.
   align-items: flex-end keeps all cards bottom-aligned for the staircase.
   -------------------------------------------------------------------------- */

.pricing-plans .gfield_radio {
  align-items: flex-end;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* --------------------------------------------------------------------------
   Individual choice item
   Column width is controlled by GF's displayColumns setting.
   -------------------------------------------------------------------------- */

.pricing-plan-choice {
  margin: 0;
  padding: 0;
}

/* Staircase: each successive card is taller, all bottom-aligned (40 px step). */
.pricing-plans .gfield_radio .pricing-plan-choice:nth-child(1) .pricing-plan-card { min-height: 380px; }
.pricing-plans .gfield_radio .pricing-plan-choice:nth-child(2) .pricing-plan-card { min-height: 420px; }
.pricing-plans .gfield_radio .pricing-plan-choice:nth-child(3) .pricing-plan-card { min-height: 460px; }
.pricing-plans .gfield_radio .pricing-plan-choice:nth-child(4) .pricing-plan-card { min-height: 500px; }

/* --------------------------------------------------------------------------
   Hide the native radio input; keep it accessible
   -------------------------------------------------------------------------- */

.pricing-plan-choice input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Label wraps the entire card → whole card is clickable
   -------------------------------------------------------------------------- */

.pricing-plan-choice label {
  display: block;
  cursor: pointer;
  height: 100%;
  margin: 0;
  font-weight: normal;
}

/* --------------------------------------------------------------------------
   The card itself
   -------------------------------------------------------------------------- */

.pricing-plan-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 3px solid #c8d6c5;
  border-radius: 4px;
  padding: 1.25rem 1rem 1rem;
  background: #fff;
  color: #2c3e2d;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.pricing-plan-choice input[type="radio"]:checked + label .pricing-plan-card,
.pricing-plan-choice label:hover .pricing-plan-card {
  border-color: #3a7c3f;
  box-shadow: 0 0 0 3px rgba(58, 124, 63, 0.18);
}

/* Focus ring for keyboard navigation */
.pricing-plan-choice input[type="radio"]:focus-visible + label .pricing-plan-card {
  outline: 3px solid #3a7c3f;
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Bestseller badge
   -------------------------------------------------------------------------- */

.pricing-plan-bestseller {
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  background: #c0392b;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 2px 2px 0 0;
}

/* --------------------------------------------------------------------------
   Bestseller card – solid green fill with white text throughout
   -------------------------------------------------------------------------- */

.pricing-plan-choice--bestseller .pricing-plan-card {
  background: #3a7c3f;
  border-color: #3a7c3f;
  color: #fff;
  padding-top: 2rem; /* room for the bestseller badge */
}

.pricing-plan-choice--bestseller input[type="radio"]:checked + label .pricing-plan-card,
.pricing-plan-choice--bestseller label:hover .pricing-plan-card {
  border-color: #2d6332;
  box-shadow: 0 0 0 3px rgba(45, 99, 50, 0.35);
}

/* Override all base-style explicit colours so white text cascades correctly. */
.pricing-plan-choice--bestseller .pricing-plan-category { color: rgba(255, 255, 255, 0.85); }

.pricing-plan-choice--bestseller .pricing-plan-speed,
.pricing-plan-choice--bestseller .pricing-plan-speed b,
.pricing-plan-choice--bestseller .pricing-plan-speed small,
.pricing-plan-choice--bestseller .pricing-plan-price b,
.pricing-plan-choice--bestseller .pricing-plan-price small,
.pricing-plan-choice--bestseller .pricing-plan-features li,
.pricing-plan-choice--bestseller .pricing-plan-addon-name,
.pricing-plan-choice--bestseller .pricing-plan-select span {
  color: #fff;
}

.pricing-plan-choice--bestseller .pricing-plan-card hr { border-top-color: rgba(255, 255, 255, 0.3); }
.pricing-plan-choice--bestseller .pricing-plan-setup   { color: rgba(255, 255, 255, 0.80); }
.pricing-plan-choice--bestseller .pricing-plan-addon-type   { color: rgba(255, 255, 255, 0.65); }
.pricing-plan-choice--bestseller .pricing-plan-addon-detail { color: rgba(255, 255, 255, 0.70); }

/* White SVG checkmark for the green-fill card */
.pricing-plan-choice--bestseller .pricing-plan-features li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='none' stroke='%23ffffff' stroke-width='1.5'/%3E%3Cpath d='M4.5 8l2.5 2.5 4.5-4.5' stroke='%23ffffff' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Dark pill button on bestseller card */
.pricing-plan-choice--bestseller .pricing-plan-select span { background: #1a1a1a; }

.pricing-plan-choice--bestseller input[type="radio"]:checked + label .pricing-plan-select span,
.pricing-plan-choice--bestseller label:hover .pricing-plan-select span {
  background: #000;
}

/* --------------------------------------------------------------------------
   Category label
   -------------------------------------------------------------------------- */

.pricing-plan-category {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #3a7c3f;
  margin-bottom: 0.2rem;
}

/* --------------------------------------------------------------------------
   Speed heading  (e.g. "300 Mbit/s")
   -------------------------------------------------------------------------- */

.pricing-plan-speed {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: normal;
  color: #2c3e2d;
  line-height: 1.1;
}

.pricing-plan-speed b {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1;
}

.pricing-plan-speed small {
  font-size: 0.9rem;
  font-weight: 700;
  color: #2c3e2d;
}

/* --------------------------------------------------------------------------
   Divider
   -------------------------------------------------------------------------- */

.pricing-plan-card hr {
  border: none;
  border-top: 1px solid #dce8db;
  margin: 0.75rem 0;
}

/* --------------------------------------------------------------------------
   Strike price (regular price shown crossed through above the action price)
   -------------------------------------------------------------------------- */

.pricing-plan-price-strike {
  line-height: 1.2;
  margin-bottom: 0.1rem;
}

.pricing-plan-price-strike s {
  font-size: 1rem;
  font-weight: 700;
  color: #6b8c6e;
  text-decoration: line-through;
}

.pricing-plan-price-strike small {
  font-size: 0.7rem;
  font-weight: 700;
  color: #6b8c6e;
}

.pricing-plan-choice--bestseller .pricing-plan-price-strike s,
.pricing-plan-choice--bestseller .pricing-plan-price-strike small {
  color: rgba(255, 255, 255, 0.60);
}

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

.pricing-plan-price {
  margin-bottom: 0.1rem;
  line-height: 1.2;
}

.pricing-plan-price b,
.pricing-plan-price small {
  font-weight: 700;
  color: #2c3e2d;
}

.pricing-plan-price b     { font-size: 2rem; }
.pricing-plan-price small { font-size: 0.8rem; }

/* --------------------------------------------------------------------------
   Setup fee
   -------------------------------------------------------------------------- */

.pricing-plan-setup {
  display: block;
  font-size: 0.75rem;
  color: #6b8c6e;
  margin-bottom: 0.75rem;
}

/* --------------------------------------------------------------------------
   Feature list
   -------------------------------------------------------------------------- */

.pricing-plan-features {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  font-size: 0.8rem;
  flex: 1 1 auto;
}

.pricing-plan-features li {
  padding: 0.15rem 0 0.15rem 1.35rem;
  position: relative;
  color: #2c3e2d;
  font-weight: 700;
}

.pricing-plan-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0.85rem;
  height: 0.85rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='none' stroke='%233a7c3f' stroke-width='1.5'/%3E%3Cpath d='M4.5 8l2.5 2.5 4.5-4.5' stroke='%233a7c3f' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

/* --------------------------------------------------------------------------
   Add-on section (e.g. DDoS-Protect)
   -------------------------------------------------------------------------- */

.pricing-plan-addon-type,
.pricing-plan-addon-name,
.pricing-plan-addon-detail {
  display: block;
  font-size: 0.75rem;
  line-height: 1.4;
}

.pricing-plan-addon-type {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2c3e2d;
}

.pricing-plan-addon-name   { color: #4a6b4e; }
.pricing-plan-addon-detail { color: #6b8c6e; }

/* --------------------------------------------------------------------------
   Select button – pill shaped, full width
   -------------------------------------------------------------------------- */

.pricing-plan-select { margin-top: 1rem; }

.pricing-plan-select span {
  display: block;
  padding: 0.65rem 1rem;
  background: #3a7c3f;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  border-radius: 50px;
  transition: background 0.15s ease;
}

.pricing-plan-choice input[type="radio"]:checked + label .pricing-plan-select span,
.pricing-plan-choice label:hover .pricing-plan-select span {
  background: #2d6332;
}

/* --------------------------------------------------------------------------
   Hide GravityForms character counter (triggered when maxLength is set).
   -------------------------------------------------------------------------- */

form.fibre-availability-inquiry-form .charleft {
  display: none;
}
