/* ==========================================================================
   ACRB CHECKOUT COMPONENT (SCOPED - NO :ROOT, NO GRADIENTS)
   Location: assets/css/frontend/checkout.css
   ========================================================================== */

/* Scoped Variable Fallbacks & Font/Text Colors */
.acrb-checkout-wrapper,
.acrb-redirect-notice,
.acrb-checkout-error {
  --acrb-checkout-primary: #4f46e5;
  --acrb-checkout-secondary: #64748b;
  --acrb-checkout-text: #0f172a;
  --acrb-checkout-accent: #059669;
  --acrb-checkout-btn-bg: #4f46e5;
  --acrb-checkout-btn-hover: #4338ca;
  --acrb-checkout-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  font-family: var(--acrb-checkout-font, sans-serif);
  color: var(--acrb-checkout-text, #0f172a);
  box-sizing: border-box;
}

.acrb-checkout-wrapper *,
.acrb-checkout-wrapper *::before,
.acrb-checkout-wrapper *::after,
.acrb-redirect-notice *,
.acrb-redirect-notice *::before,
.acrb-redirect-notice *::after,
.acrb-checkout-error *,
.acrb-checkout-error *::before,
.acrb-checkout-error *::after {
  box-sizing: inherit;
}

/* --------------------------------------------------------------------------
   Auxiliary States (Redirect Notice & Inventory Error)
   -------------------------------------------------------------------------- */
.acrb-redirect-notice {
  padding: 60px 20px;
  text-align: center;
  font-size: 15px;
  color: var(--acrb-checkout-secondary, #64748b);
}

.acrb-checkout-error {
  max-width: 600px;
  margin: 80px auto;
  text-align: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 48px;
  box-shadow: 0 15px 30px -10px rgba(15, 23, 42, 0.08);
}

.acrb-checkout-error h3 {
  color: var(--acrb-checkout-text, #0f172a);
  margin-top: 0;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.acrb-checkout-error p {
  color: var(--acrb-checkout-secondary, #64748b);
  font-size: 14px;
  margin: 8px 0 24px 0;
  line-height: 1.5;
}

.acrb-checkout-error a {
  background: var(--acrb-checkout-primary, #4f46e5);
  border: 1px solid var(--acrb-checkout-primary, #4f46e5);
  color: #ffffff !important;
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  transition: background 0.2s ease, border-color 0.15s ease;
}

.acrb-checkout-error a:hover {
  background: var(--acrb-checkout-btn-hover, #4338ca);
  border-color: var(--acrb-checkout-btn-hover, #4338ca);
}

/* --------------------------------------------------------------------------
   Checkout Core Layout & Progress Steps
   -------------------------------------------------------------------------- */
.acrb-checkout-wrapper {
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px 16px 80px 16px;
}

.acrb-checkout-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  vertical-align: middle;
}

.acrb-checkout-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 24px;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.03);
}

.acrb-step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #94a3b8;
  position: relative;
}

.acrb-step-item:not(:last-child):after {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: #e2e8f0;
  margin-left: 12px;
}

.acrb-step-item.active {
  color: var(--acrb-checkout-primary, #4f46e5);
}

.acrb-step-item.completed {
  color: #059669;
}

.acrb-step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  flex-shrink: 0;
}

.acrb-step-item.active .acrb-step-num {
  background: var(--acrb-checkout-primary, #4f46e5);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.acrb-step-item.completed .acrb-step-num {
  background: #dcfce7;
  color: #059669;
}

/* Grid & Cards */
.acrb-checkout-grid {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 32px;
  align-items: flex-start;
}

.acrb-checkout-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.05);
}

.acrb-checkout-title {
  margin: 0 0 18px 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--acrb-checkout-text, #0f172a);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Vehicle Review Card & Itinerary */
.acrb-review-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
}

.acrb-review-vehicle {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px dashed #cbd5e1;
}

.acrb-review-thumb {
  width: 90px;
  height: 65px;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.acrb-review-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.acrb-review-info h4 {
  margin: 0 0 4px 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--acrb-checkout-text, #0f172a);
}

.acrb-review-meta {
  font-size: 0.8rem;
  color: var(--acrb-checkout-secondary, #64748b);
}

.acrb-review-meta strong {
  color: var(--acrb-checkout-text, #0f172a);
}

.acrb-itinerary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.acrb-itinerary-pill {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.02);
  position: relative;
  overflow: hidden;
}

.acrb-itinerary-pill::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.acrb-itinerary-pill.pickup::before {
  background: #059669;
}

.acrb-itinerary-pill.return::before {
  background: var(--acrb-checkout-primary, #4f46e5);
}

.acrb-itinerary-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--acrb-checkout-secondary, #64748b);
}

.acrb-itinerary-header svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

.acrb-itinerary-pill.pickup .acrb-itinerary-header svg {
  color: #059669;
}

.acrb-itinerary-pill.return .acrb-itinerary-header svg {
  color: var(--acrb-checkout-primary, #4f46e5);
}

.acrb-itinerary-date {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--acrb-checkout-text, #0f172a);
  display: flex;
  align-items: center;
  gap: 6px;
}

.acrb-itinerary-date svg {
  width: 15px;
  height: 15px;
  color: #94a3b8;
  stroke-width: 2;
  flex-shrink: 0;
}

.acrb-itinerary-location {
  font-size: 0.8rem;
  color: #475569;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}

.acrb-itinerary-location svg {
  width: 13px;
  height: 13px;
  color: #94a3b8;
  flex-shrink: 0;
}

/* Form Fields & Inputs */
.acrb-checkout-field {
  margin-bottom: 14px;
}

.acrb-checkout-field label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.acrb-checkout-input {
	width: 100% !important;
	height: 44px;
	padding: 8px 14px !important;
	background: #f8fafc !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 10px !important;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--acrb-checkout-text, #0f172a) !important;
	outline: none;
	transition: border-color 0.15s ease;
	font-family: inherit;
}

.acrb-checkout-input:focus {
  border-color: var(--acrb-checkout-primary, #4f46e5);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.acrb-checkout-input:read-only {
  background: #f1f5f9;
  color: #475569;
  cursor: not-allowed;
}

/* Payment Options */
.acrb-pay-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.acrb-pay-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--acrb-checkout-text, #0f172a);
  transition: all 0.2s ease;
}

.acrb-pay-option:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.acrb-pay-option.selected {
  border-color: var(--acrb-checkout-primary, #4f46e5);
  background: #eef2ff;
}

.acrb-pay-option input {
  accent-color: var(--acrb-checkout-primary, #4f46e5);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Coupon Box */
.acrb-coupon-wrap {
  display: flex;
  gap: 8px;
}

.acrb-input-compact {
  flex: 1;
}

button.acrb-coupon-btn {
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 0 18px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
  font-family: inherit;
}

button.acrb-coupon-btn:hover {
  background: var(--acrb-checkout-primary, #4f46e5);
}

.acrb-coupon-msg {
  display: none;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 8px;
}

/* Summary Breakdown */
.acrb-breakdown-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 20px;
}

.acrb-bd-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.88rem;
}

.acrb-bd-label span {
  display: block;
  font-weight: 700;
  color: var(--acrb-checkout-text, #0f172a);
}

.acrb-bd-sub {
  font-size: 0.74rem;
  color: var(--acrb-checkout-secondary, #64748b);
  font-weight: 500;
}

.acrb-bd-val {
  font-weight: 800;
  color: var(--acrb-checkout-text, #0f172a);
  white-space: nowrap;
}

.acrb-bd-discount {
  display: none;
  color: var(--acrb-checkout-accent, #059669) !important;
}

.acrb-bd-discount .acrb-bd-val,
.acrb-bd-discount span {
  color: var(--acrb-checkout-accent, #059669) !important;
}

.acrb-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 0;
  border-top: 1px dashed #cbd5e1;
  margin-bottom: 18px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--acrb-checkout-text, #0f172a);
}

.acrb-total-accent {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--acrb-checkout-primary, #4f46e5);
  letter-spacing: -0.02em;
}

/* Terms & Confirmation Button */
.acrb-terms-wrap {
  margin-bottom: 20px;
}

.acrb-terms-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: #475569;
  cursor: pointer;
  line-height: 1.4;
}

.acrb-terms-check {
  margin-top: 2px;
  accent-color: var(--acrb-checkout-primary, #4f46e5);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

button.acrb-btn-confirm {
  width: 100%;
  height: 52px;
  background: var(--acrb-checkout-btn-bg, #4f46e5);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
  font-family: inherit;
}

button.acrb-btn-confirm:hover {
  background: var(--acrb-checkout-btn-hover, #4338ca);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
}

.acrb-btn-confirm svg {
  width: 18px;
  height: 18px;
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .acrb-checkout-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .acrb-itinerary-grid {
    grid-template-columns: 1fr;
  }
  .acrb-checkout-steps {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
  }
  .acrb-step-item:not(:last-child):after {
    display: none;
  }
}