/**
 * Hostoral Modern Dynamic Checkout Stylesheet
 * Pixel-perfect implementation matching the provided design.
 */

:root {
  --hs-primary: #006241;
  --hs-primary-hover: #004d33;
  --hs-primary-light: #f0fdf4;
  --hs-primary-border: #056b4f;
  --hs-text-main: #111827;
  --hs-text-muted: #6b7280;
  --hs-text-body: #374151;
  --hs-border: #e5e7eb;
  --hs-card-border: #eef0f2;
  --hs-bg: #f8fafc;
  --hs-radius-lg: 20px;
  --hs-radius-md: 12px;
  --hs-radius-sm: 8px;
  --hs-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body.woocommerce-checkout {
  background-color: var(--hs-bg);
  -webkit-font-smoothing: antialiased;
}

.hs-checkout-wrapper {
  font-family: var(--hs-font);
  color: var(--hs-text-main);
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

/* Steps Indicator */
.hs-checkout-steps {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
}

.hs-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.hs-step.is-active {
  color: var(--hs-primary);
}

.hs-step-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #cbd5e1;
  display: inline-block;
}

.hs-step.is-active .hs-step-dot {
  background-color: var(--hs-primary);
}

/* Checkout Main Title */
.hs-checkout-title {
  font-size: 42px;
  font-weight: 800;
  color: var(--hs-text-main);
  letter-spacing: -0.03em;
  margin: 0 0 32px 0;
  line-height: 1.1;
}

/* 2-Column Grid Layout */
.hs-checkout-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  align-items: start;
}

/* Left & Right Cards */
.hs-card {
  background: #ffffff;
  border: 1px solid var(--hs-card-border);
  border-radius: var(--hs-radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.hs-left-card {
  padding: 38px 40px;
}

.hs-right-card {
  padding: 36px 34px;
  position: sticky;
  top: 140px;
}

/* Section Headings */
.hs-section-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--hs-text-main);
  margin: 0 0 18px 0;
  letter-spacing: -0.015em;
}

.hs-section-divider,
.hs-section-gap {
  margin-top: 36px !important;
  border: none !important;
  padding: 0 !important;
}

/* 1. Plan Selector Cards */
.hs-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.hs-plan-card {
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 14px;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 4px;
  user-select: none;
  position: relative;
}

.hs-plan-card:hover {
  border-color: #cbd5e1;
}

.hs-plan-card.is-selected,
.hs-plan-card.is-selected:hover {
  border: 1.5px solid #006241;
  background: #f7faf8;
  box-shadow: none;
}

.hs-plan-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hs-radio-dot {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  border-radius: 50%;
  border: 1.5px solid #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  background: #ffffff;
}

.hs-radio-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  min-width: 8px;
  min-height: 8px;
  border-radius: 50%;
  background: #006241;
  display: none;
}

.hs-plan-card.is-selected .hs-radio-dot {
  border-color: #006241;
  background: #ffffff;
}

.hs-plan-card.is-selected .hs-radio-dot::after {
  display: block;
}

.hs-plan-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--hs-text-main);
}

.hs-plan-details {
  font-size: 12.5px;
  color: var(--hs-text-muted);
  margin-left: 25px;
  line-height: 1.35;
}

/* Form Controls (Inputs, Selects, Labels) */
.hs-checkout-wrapper .hs-form-group {
  margin-bottom: 20px !important;
}

.hs-checkout-wrapper .hs-form-group:last-child {
  margin-bottom: 0 !important;
}

.hs-checkout-wrapper .hs-label {
  display: block !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #111827 !important;
  margin: 0 0 8px 0 !important;
  line-height: 1.2 !important;
}

/* Inputs and Selects styling */
.hs-checkout-wrapper input[type="text"],
.hs-checkout-wrapper input[type="email"],
.hs-checkout-wrapper select,
.hs-checkout-wrapper .hs-input,
.hs-checkout-wrapper .hs-select {
  display: block !important;
  width: 100% !important;
  height: 48px !important;
  min-height: 48px !important;
  line-height: 48px !important;
  background-color: #ffffff !important;
  border: 1.5px solid #e5e7eb !important;
  border-radius: 10px !important;
  padding: 0 16px !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  font-family: var(--hs-font) !important;
  color: #111827 !important;
  box-sizing: border-box !important;
  box-shadow: none !important;
  outline: none !important;
  margin: 0 !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.hs-checkout-wrapper input[type="text"]:focus,
.hs-checkout-wrapper input[type="email"]:focus,
.hs-checkout-wrapper select:focus,
.hs-checkout-wrapper .hs-input:focus,
.hs-checkout-wrapper .hs-select:focus {
  border-color: #006241 !important;
  box-shadow: 0 0 0 3px rgba(0, 98, 65, 0.1) !important;
  background-color: #ffffff !important;
}

.hs-checkout-wrapper input::placeholder {
  color: #9ca3af !important;
  font-size: 15px !important;
  opacity: 1 !important;
}

/* Custom styled native select */
.hs-checkout-wrapper select,
.hs-checkout-wrapper .hs-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.5 1.75L6 6.25L10.5 1.75' stroke='%23374151' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
  background-size: 12px 8px !important;
  padding-right: 42px !important;
  cursor: pointer !important;
}

/* Helper text below email & domain */
.hs-checkout-wrapper .hs-field-hint {
  font-size: 12.5px !important;
  color: #6b7280 !important;
  margin-top: 6px !important;
  line-height: 1.4 !important;
}

/* 2-Column Form Rows */
.hs-checkout-wrapper .hs-row-2col {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 16px !important;
  margin-bottom: 20px !important;
}

/* Completely suppress Select2 on this form */
.hs-checkout-wrapper .select2,
.hs-checkout-wrapper .select2-container,
.hs-checkout-wrapper .select2-container--default {
  display: none !important;
}

.hs-checkout-wrapper select#billing_country {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* 3. Payment Method Cards & Dynamic Gateways */
.hs-checkout-wrapper #payment.woocommerce-checkout-payment {
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
}

.hs-checkout-wrapper .woocommerce-checkout-payment .form-row.place-order {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
}

.hs-payment-methods,
.hs-checkout-wrapper ul.wc_payment_methods {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 24px 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.hs-checkout-wrapper li.wc_payment_method {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.hs-payment-card {
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 22px;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  user-select: none;
}

.hs-payment-card:hover {
  border-color: #cbd5e1;
}

.hs-payment-card.is-selected,
.hs-payment-card.is-selected:hover {
  border: 1.5px solid #006241;
  background: #f7faf8;
  box-shadow: none;
}

.hs-payment-card .hs-radio-dot {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  border-radius: 50%;
  border: 1.5px solid #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  margin-top: 2px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.hs-payment-card .hs-radio-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  min-width: 8px;
  min-height: 8px;
  border-radius: 50%;
  background: #006241;
  display: none;
}

.hs-payment-card.is-selected .hs-radio-dot {
  border-color: #006241;
  background: #ffffff;
}

.hs-payment-card.is-selected .hs-radio-dot::after {
  display: block;
}

.hs-payment-info {
  flex: 1;
}

.hs-payment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0;
}

.hs-payment-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #111827;
  margin: 0;
  cursor: pointer;
  line-height: 1.3;
}

.hs-payment-desc {
  font-size: 13.5px;
  color: #4b5563;
  line-height: 1.45;
  margin-top: 5px;
  margin-bottom: 0;
}

.hs-payment-box {
  display: none !important;
}

/* Terms and Conditions Box */
.hs-terms-box {
  border: 1.5px dashed var(--hs-primary-border);
  border-radius: 10px;
  padding: 14px 18px;
  background: #fbfdfc;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

form.hs-checkout-form .hs-terms-box .hs-terms-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.hs-terms-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  accent-color: var(--hs-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.hs-terms-label {
  font-size: 13.5px;
  color: var(--hs-text-body);
  line-height: 1.4;
  cursor: pointer;
  margin: 0;
}

.hs-terms-label a {
  color: var(--hs-text-main);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  transition: color 0.15s;
}

.hs-terms-label a:hover {
  color: var(--hs-primary);
}

/* Submit Button */
.hs-submit-btn {
  width: 100%;
  height: 54px;
  background-color: var(--hs-primary) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: var(--hs-radius-md) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 2px 6px rgba(0, 98, 65, 0.18) !important;
}

.hs-submit-btn:hover {
  background-color: var(--hs-primary-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 98, 65, 0.25) !important;
}

.hs-submit-btn:active {
  transform: translateY(0);
}

.hs-submit-btn .hs-btn-arrow {
  font-size: 18px;
  transition: transform 0.2s ease;
}

.hs-submit-btn:hover .hs-btn-arrow {
  transform: translateX(3px);
}

/* Right Card: Order Summary */
.hs-summary-header {
  margin-bottom: 20px;
}

.hs-summary-plan-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--hs-text-main);
  margin-bottom: 4px;
}

.hs-summary-plan-specs {
  font-size: 13.5px;
  color: var(--hs-text-muted);
  line-height: 1.4;
}

/* Summary Line Items */
.hs-summary-lines {
  margin: 22px 0;
}

.hs-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 14.5px;
  color: #4b5563;
}

.hs-summary-row:last-child {
  margin-bottom: 0;
}

.hs-summary-val {
  font-weight: 500;
  color: var(--hs-text-main);
}

.hs-summary-divider {
  height: 1px;
  background-color: var(--hs-border);
  margin: 20px 0;
}

/* Due Today Total */
.hs-due-today-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.hs-due-today-label {
  font-size: 22px;
  font-weight: 800;
  color: var(--hs-text-main);
  letter-spacing: -0.01em;
}

.hs-due-today-val {
  font-size: 28px;
  font-weight: 800;
  color: var(--hs-text-main);
  letter-spacing: -0.02em;
}

.hs-billed-monthly {
  font-size: 13px;
  color: var(--hs-text-muted);
  margin-bottom: 24px;
}

/* Guarantee Checklist */
.hs-guarantee-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  border-top: 1px solid #f1f3f5;
  padding-top: 20px;
}

.hs-guarantee-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--hs-text-body);
  margin-bottom: 10px;
}

.hs-guarantee-item:last-child {
  margin-bottom: 0;
}

.hs-check-icon {
  width: 16px;
  height: 16px;
  color: var(--hs-primary);
  flex-shrink: 0;
}

/* What Happens Next */
.hs-next-box {
  border-top: 1px solid #f1f3f5;
  padding-top: 22px;
}

.hs-next-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--hs-text-main);
  margin: 0 0 16px 0;
}

.hs-next-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.45;
}

.hs-next-step:last-child {
  margin-bottom: 0;
}

.hs-step-badge {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #dcfce7;
  color: #15803d;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* WooCommerce Notices Styling */
.woocommerce-NoticeGroup,
.woocommerce-error,
.woocommerce-message {
  margin-bottom: 24px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-family: inherit !important;
}

.woocommerce-error {
  background-color: #fef2f2 !important;
  color: #991b1b !important;
  border: 1px solid #fecaca !important;
  padding: 14px 18px !important;
  list-style: none !important;
}

.woocommerce-error li {
  margin-bottom: 4px;
}

.woocommerce-error li:last-child {
  margin-bottom: 0;
}

/* Loading Overlay for Dynamic Plan Switching (Disabled - values change instantly without reload) */
.hs-summary-loading {
  opacity: 1 !important;
}



/* Responsive Media Queries */
@media (max-width: 992px) {
  .hs-checkout-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hs-right-card {
    position: static;
  }
}

@media (max-width: 640px) {
  .hs-checkout-wrapper {
    padding: 24px 16px 60px;
  }

  .hs-checkout-title {
    font-size: 32px;
    margin-bottom: 24px;
  }

  .hs-left-card,
  .hs-right-card {
    padding: 24px 20px;
    border-radius: 16px;
  }

  .hs-plan-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hs-row-2col {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hs-checkout-steps {
    gap: 14px;
    font-size: 11px;
    flex-wrap: wrap;
  }
}