/* ==========================================================================
   ACRB SINGLE CAR DETAILS (SCOPED COMPONENT - NO :ROOT, NO GRADIENTS)
   Location: assets/css/frontend/single-car.css
   ========================================================================== */

/* Scoped Variable Fallbacks & Font/Text Colors */
.acrb-main-container,
.acrb-redirect-notice,
.acrb-alert-error {
  --acrb-single-primary: #4f46e5;
  --acrb-single-secondary: #64748b;
  --acrb-single-text: #0f172a;
  --acrb-single-accent: #059669;
  --acrb-single-btn-bg: #4f46e5;
  --acrb-single-btn-hover: #4338ca;
  --acrb-single-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  font-family: var(--acrb-single-font, sans-serif);
  color: var(--acrb-single-text, #0f172a);
  box-sizing: border-box;
}

.acrb-main-container *,
.acrb-main-container *::before,
.acrb-main-container *::after,
.acrb-redirect-notice *,
.acrb-redirect-notice *::before,
.acrb-redirect-notice *::after,
.acrb-alert-error *,
.acrb-alert-error *::before,
.acrb-alert-error *::after {
  box-sizing: inherit;
}

/* --------------------------------------------------------------------------
   Auxiliary States (Redirect Notice & Error State)
   -------------------------------------------------------------------------- */
.acrb-redirect-notice {
  padding: 60px 20px;
  text-align: center;
  font-size: 15px;
  color: var(--acrb-single-secondary, #64748b);
}

.acrb-alert-error {
  padding: 40px;
  text-align: center;
  background: #fef2f2;
  color: #991b1b;
  border-radius: 14px;
  border: 1px solid #fecaca;
  font-weight: 600;
  max-width: 680px;
  margin: 40px auto;
}

/* --------------------------------------------------------------------------
   Layout & Typography
   -------------------------------------------------------------------------- */
.acrb-main-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 16px 60px 16px;
}

.acrb-single-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  vertical-align: middle;
}

.acrb-flex-grid {
  display: flex;
  align-items: flex-start;
  gap: 36px;
}

.acrb-content-left {
  flex: 1;
  min-width: 0;
}

.acrb-sidebar-right {
  width: 440px;
  flex-shrink: 0;
  position: sticky;
  top: 24px;
}

/* --------------------------------------------------------------------------
   Gallery Stage & Hero Display
   -------------------------------------------------------------------------- */
.acrb-gallery-stage {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
  margin-bottom: 24px;
  aspect-ratio: 16 / 10;
  position: relative;
}

.acrb-gallery-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.25s ease;
}

.acrb-hero-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  color: #94a3b8;
  gap: 8px;
}

.acrb-hero-placeholder svg {
  width: 52px;
  height: 52px;
}

/* Vehicle Header Block */
.acrb-header-box {
  margin-bottom: 24px;
}

.acrb-vin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.acrb-car-title {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--acrb-single-text, #0f172a);
}

/* --------------------------------------------------------------------------
   Tabs Navigation & Content
   -------------------------------------------------------------------------- */
.acrb-tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #f1f5f9;
  margin-bottom: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

.acrb-tabs-nav::-webkit-scrollbar {
  display: none;
}

button.acrb-tab-btn {
  background: transparent;
  border: none;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--acrb-single-secondary, #64748b);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: inherit;
}

button.acrb-tab-btn:hover {
  color: var(--acrb-single-primary, #4f46e5);
}

button.acrb-tab-btn.active {
  color: var(--acrb-single-primary, #4f46e5);
  border-bottom-color: var(--acrb-single-primary, #4f46e5);
}

.acrb-tab-pane {
  display: none;
  animation: acrbFadeIn 0.2s ease-in-out;
}

.acrb-tab-pane.active {
  display: block;
}

@keyframes acrbFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.acrb-description {
  font-size: 1rem;
  line-height: 1.7;
  color: #334155;
}

.acrb-description p {
  margin-top: 0;
}

/* Specs Grid */
.acrb-specs-heading {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 16px 0;
  color: var(--acrb-single-secondary, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.acrb-spec-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}

.acrb-spec-node {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.acrb-spec-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #eef2ff;
  color: var(--acrb-single-primary, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.acrb-spec-icon-wrap svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.acrb-spec-node-lbl {
  font-size: 0.74rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--acrb-single-secondary, #64748b);
  letter-spacing: 0.05em;
}

.acrb-spec-node-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--acrb-single-text, #0f172a);
}

/* Gallery Grid */
.acrb-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.acrb-gallery-thumb-wrap {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.acrb-gallery-thumb-wrap.is-active,
.acrb-gallery-thumb-wrap:hover {
  border-color: var(--acrb-single-primary, #4f46e5);
  transform: scale(1.03);
}

.acrb-gallery-thumb-wrap img,
.acrb-gallery-item {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.acrb-video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 16px;
}

.acrb-video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Empty Content Helpers */
.acrb-empty-box {
  padding: 50px 20px;
  text-align: center;
  background: #f8fafc;
  border-radius: 14px;
  color: var(--acrb-single-secondary, #64748b);
  border: 1px dashed #cbd5e1;
}

.acrb-empty-msg {
  color: var(--acrb-single-secondary, #64748b);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   Booking Sidebar Card & Forms
   -------------------------------------------------------------------------- */
.acrb-booking-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.1), 0 1px 3px rgba(15, 23, 42, 0.04);
}

.acrb-price-hero {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid #f1f5f9;
}

.acrb-price-amount {
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--acrb-single-text, #0f172a);
  letter-spacing: -0.02em;
}

.acrb-price-unit {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--acrb-single-secondary, #64748b);
}

/* Inputs & Form Rows */
.acrb-form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.acrb-form-col-date {
  flex: 2;
}

.acrb-form-col-time {
  flex: 1.2;
}

.acrb-locations-row {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.acrb-form-col-half {
  flex: 1;
}

.acrb-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--acrb-single-text, #0f172a);
  margin-bottom: 6px;
}

.acrb-input {
  width: 100% !important;
  height: 42px !important;
  padding: 8px 12px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  color: var(--acrb-single-text, #0f172a) !important;
  transition: all 0.2s ease !important;
  font-family: inherit !important;
  outline: none !important;
}

.acrb-input:hover {
  border-color: #94a3b8 !important;
  background: #ffffff !important;
}

.acrb-input:focus {
  background: #ffffff !important;
  border-color: var(--acrb-single-primary, #4f46e5) !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12) !important;
}

.acrb-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20fill%3D%22%2364748b%22%20d%3D%22M5.23%207.21a.75.75%200%20011.06.02L10%2011.168l3.71-3.938a.75.75%200%20111.08%201.04l-4.25%204.5a.75.75%200%2001-1.08%200l-4.25-4.5a.75.75%200%2001.02-1.06z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 38px !important;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Luxury Radio Cards (Insurance & Border Crossing)
   -------------------------------------------------------------------------- */
.acrb-luxury-options-group {
  margin-bottom: 18px;
}

.acrb-group-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--acrb-single-secondary, #64748b);
  margin-bottom: 10px;
}

.acrb-luxury-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.acrb-luxury-card:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.acrb-luxury-card.selected {
  background: #eef2ff;
  border-color: var(--acrb-single-primary, #4f46e5);
}

.acrb-luxury-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0f172a;
}

.acrb-luxury-card input[type="radio"] {
  accent-color: var(--acrb-single-primary, #4f46e5);
  width: 17px;
  height: 17px;
  cursor: pointer;
}

.acrb-luxury-price {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--acrb-single-primary, #4f46e5);
}

/* --------------------------------------------------------------------------
   Breakdown Summary Card
   -------------------------------------------------------------------------- */
.acrb-breakdown-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.04);
}

.acrb-breakdown-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--acrb-single-secondary, #64748b);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.acrb-breakdown-header svg {
  width: 16px;
  height: 16px;
  color: var(--acrb-single-primary, #4f46e5);
}

.acrb-bd-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.88rem;
  color: #334155;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.acrb-bd-item:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.acrb-bd-item-dynamic {
  display: none;
}

.acrb-bd-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.acrb-bd-icon-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eef2ff;
  color: var(--acrb-single-primary, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.acrb-bd-label span {
  display: block;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.2;
}

.acrb-bd-sub {
  font-size: 0.74rem;
  color: var(--acrb-single-secondary, #64748b);
  font-weight: normal;
}

.acrb-bd-val {
  font-weight: 800;
  color: var(--acrb-single-text, #0f172a);
  white-space: nowrap;
}

.acrb-breakdown-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 12px;
  margin-top: 10px;
  border-top: 1px dashed #cbd5e1;
  font-weight: 800;
  font-size: 1rem;
  color: var(--acrb-single-text, #0f172a);
}

.acrb-total-accent {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--acrb-single-primary, #4f46e5);
}

/* Error notification */
.acrb-calc-error {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
}

/* Submit Button */
button.acrb-submit-btn,
.acrb-submit-btn {
  width: 100%;
  height: 48px;
  background: var(--acrb-single-btn-bg, #4f46e5);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  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-submit-btn:hover,
.acrb-submit-btn:hover {
  background: var(--acrb-single-btn-hover, #4338ca);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.35);
}

button.acrb-submit-btn:disabled,
.acrb-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.acrb-submit-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .acrb-flex-grid {
    flex-direction: column;
  }
  .acrb-sidebar-right {
    width: 100%;
    position: static;
  }
}

@media (max-width: 640px) {
  .acrb-form-row,
  .acrb-locations-row {
    flex-direction: column;
    gap: 10px;
  }
  .acrb-car-title {
    font-size: 1.7rem;
  }
}