/*
 * InstaFluid Booking – Core Stylesheet
 * Version: 1.1.0
 */

:root {
  --ifb-primary: #0652DD;
  --ifb-primary-hover: #0543B3;
  --ifb-bg-canvas: #F4F6F9;
  --ifb-bg-card: #FFFFFF;
  --ifb-bg-hover: #F8FAFC;
  --ifb-bg-selected: #F0F5FF;
  
  --ifb-text-main: #111827;
  --ifb-text-muted: #6B7280;
  --ifb-text-light: #9CA3AF;
  
  --ifb-border: #E5E7EB;
  --ifb-border-hover: #A5C2FF;
  
  --ifb-radius-sm: 8px;
  --ifb-radius-md: 12px;
  --ifb-radius-lg: 16px;
  --ifb-radius-pill: 30px;
  
  --ifb-shadow-sm: 0 2px 8px rgba(0,0,0,0.03);
  --ifb-shadow-lg: 0 4px 20px rgba(0,0,0,0.05);
  
  --ifb-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Reset (scoped) ─────────────────────────────────── */
.ifb-wrap,
.ifb-wrap *,
.ifb-wrap *::before,
.ifb-wrap *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Shell ──────────────────────────────────────────── */
.ifb-wrap {
  font-family: var(--ifb-font);
  -webkit-font-smoothing: antialiased;
  color: var(--ifb-text-main);
  background: transparent !important;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

/* ── Two-column layout ──────────────────────────────── */
.ifb-layout {
  display: flex;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  gap: 24px;
  overflow: hidden;
  align-items: flex-start;
}

/* ── Sidebar ────────────────────────────────────────── */
.ifb-sidebar {
  flex: 0 0 320px;
  position: sticky;
  top: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ifb-card {
  background: #ffffff;
  border-radius: var(--ifb-radius-lg);
  box-shadow: var(--ifb-shadow-sm);
  border: 1px solid var(--ifb-border);
}

/* Progress card */
.ifb-progress-card {
  padding: 28px 24px;
}

.ifb-book-label {
  font-weight: 700;
  font-size: 16px;
  color: var(--ifb-text-main);
  margin-bottom: 4px;
}

.ifb-step-meta {
  font-size: 13px;
  color: var(--ifb-text-muted);
  margin-bottom: 24px;
}

.ifb-progress-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ifb-progress-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  cursor: pointer;
  border-radius: var(--ifb-radius-sm);
  transition: background 0.2s ease;
}

.ifb-progress-item:hover { background: var(--ifb-bg-hover); }

.ifb-progress-item.is-future-disabled {
  pointer-events: none !important;
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

.ifb-step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: #fff;
  color: var(--ifb-text-light);
  border: 1.5px solid var(--ifb-border);
  transition: all 0.2s ease;
  line-height: 1;
}

.ifb-step-circle.is-done {
  background: var(--ifb-primary);
  color: #fff;
  border-color: transparent;
}

.ifb-step-circle.is-current {
  background: var(--ifb-bg-selected);
  color: var(--ifb-primary);
  border: 2px solid var(--ifb-primary);
}

.ifb-step-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--ifb-text-muted);
  transition: all 0.2s ease;
}

.ifb-step-label.is-active {
  color: var(--ifb-text-main);
  font-weight: 700;
}

/* Summary card */
.ifb-summary-card {
  padding: 24px;
}

.ifb-summary-heading {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ifb-text-light);
  margin-bottom: 20px;
}

.ifb-summary-rows {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ifb-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
}

.ifb-sr-label { color: var(--ifb-text-muted); }

.ifb-sr-val {
  font-weight: 700;
  color: var(--ifb-text-main);
  text-align: right;
  max-width: 60%;
}

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

.ifb-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.ifb-summary-total-label {
  font-weight: 700;
  font-size: 16px;
  color: var(--ifb-text-main);
}

.ifb-price {
  font-weight: 800;
  font-size: 24px;
  color: var(--ifb-primary);
  font-variant-numeric: tabular-nums;
}

/* ── Main panel ─────────────────────────────────────── */
.ifb-main {
  flex: 1;
  min-width: 0;
  background: #ffffff;
  border-radius: var(--ifb-radius-lg);
  padding: 40px;
  box-shadow: var(--ifb-shadow-lg);
  min-height: auto;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ifb-border);
}

.ifb-steps-wrap { flex: 1; }

.ifb-step { display: none; }
.ifb-step.is-active { display: block; }

/* ── Step typography ────────────────────────────────── */
.ifb-step-title {
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.5px;
  color: var(--ifb-text-main);
  text-wrap: balance;
  line-height: 1.2;
}

.ifb-step-desc {
  font-size: 15px;
  color: var(--ifb-text-muted);
  margin-top: 8px;
  margin-bottom: 32px;
  line-height: 1.5;
}

/* ── Step 1 – Customer type ─────────────────────────── */
.ifb-type-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 24px;
  width: 100%;
}

.ifb-type-card {
  border: 2px solid var(--ifb-border) !important;
  border-radius: var(--ifb-radius-lg) !important;
  padding: 24px !important;
  cursor: pointer !important;
  background: var(--ifb-bg-card) !important;
  text-align: left !important;
  transition: all 0.2s ease !important;
  width: 100% !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  white-space: normal !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
}

.ifb-type-card:hover {
  border-color: #0652DD !important;
  background: var(--ifb-bg-hover) !important;
}

.ifb-type-card.is-selected {
  border-color: #0652DD !important;
  background: #0652DD !important;
}
.ifb-type-card.is-selected .ifb-type-name,
.ifb-type-card.is-selected .ifb-type-desc {
  color: #ffffff !important;
}
.ifb-type-card.is-selected .ifb-type-icon {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

.ifb-type-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--ifb-bg-selected);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ifb-primary);
  margin-bottom: 20px;
}

.ifb-type-name {
  font-weight: 700;
  font-size: 18px;
  color: var(--ifb-text-main);
  margin-bottom: 6px;
}

.ifb-type-desc {
  font-size: 14px;
  color: var(--ifb-text-muted);
  line-height: 1.5;
}

.ifb-returning-lookup {
  background: var(--ifb-bg-hover);
  border-radius: var(--ifb-radius-md);
  padding: 24px;
  display: none;
  border: 1px solid var(--ifb-border);
}

.ifb-returning-lookup.is-visible { display: block; }

.ifb-lookup-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--ifb-text-main);
  margin-bottom: 6px;
}

.ifb-lookup-desc {
  font-size: 14px;
  color: var(--ifb-text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.ifb-lookup-row {
  display: flex;
  gap: 12px;
}

button#ifb-lookup-btn.ifb-lookup-btn[type="button"],
button#ifb-lookup-btn.ifb-lookup-btn,
.ifb-lookup-row button.ifb-lookup-btn,
.ifb-lookup-btn {
  background: #ffffff !important;
  color: #0652DD !important;
  border: 2px solid #0652DD !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  padding: 12px 24px !important;
  border-radius: var(--ifb-radius-md) !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 0.2s ease !important;
  font-family: inherit !important;
  outline: none !important;
  box-shadow: none !important;
}

button#ifb-lookup-btn.ifb-lookup-btn[type="button"]:hover,
button#ifb-lookup-btn.ifb-lookup-btn[type="button"]:focus,
button#ifb-lookup-btn.ifb-lookup-btn:hover,
button#ifb-lookup-btn.ifb-lookup-btn:focus,
.ifb-lookup-row button.ifb-lookup-btn:hover,
.ifb-lookup-row button.ifb-lookup-btn:focus,
.ifb-lookup-btn:hover,
.ifb-lookup-btn:focus {
  background: #0652DD !important;
  color: #ffffff !important;
  border-color: #0652DD !important;
  box-shadow: 0 0 0 4px rgba(6, 82, 221, 0.15) !important;
}

/* ── Form primitives ────────────────────────────────── */
.ifb-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--ifb-border);
  border-radius: var(--ifb-radius-md);
  font-size: 15px;
  font-family: inherit;
  color: var(--ifb-text-main);
  background: var(--ifb-bg-card);
  outline: none;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.ifb-input:focus {
  border-color: var(--ifb-primary);
  box-shadow: 0 0 0 4px rgba(0, 82, 255, 0.1);
}

.ifb-input::placeholder { color: var(--ifb-text-light); }

select.ifb-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  cursor: pointer;
}

.ifb-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ifb-text-main);
  margin-bottom: 8px;
}

.ifb-optional { font-weight: 400; color: var(--ifb-text-light); }

.ifb-field { display: flex; flex-direction: column; }

.ifb-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.ifb-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.ifb-col-2 { grid-column: span 2; }
.ifb-col-3 { grid-column: span 3; }

.ifb-checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  font-size: 14px;
  color: var(--ifb-text-main);
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}

.ifb-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--ifb-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.ifb-checkbox.is-unchecked {
  background: var(--ifb-bg-card);
  border-color: var(--ifb-border);
}

/* ── Step 3 – Vehicle ───────────────────────────────── */
.ifb-vehicle-card {
  background: #111827;
  border-radius: var(--ifb-radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.ifb-vehicle-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--ifb-radius-md);
  background: var(--ifb-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.ifb-vehicle-name {
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 4px;
}

.ifb-vehicle-note {
  color: #9CA3AF;
  font-size: 13px;
}

/* ── Step 4 – Map ───────────────────────────────────── */
.ifb-map {
  position: relative;
  height: 200px;
  border-radius: var(--ifb-radius-lg);
  overflow: hidden;
  background: #111827;
  margin-top: 4px;
}

.ifb-map-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(#1f2937 1px, transparent 1px),
    linear-gradient(90deg, #1f2937 1px, transparent 1px);
  background-size: 38px 38px;
  opacity: 0.7;
}

.ifb-map-glow {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,82,255,0.4) 0%, rgba(0,82,255,0) 70%);
  border: 1px solid rgba(61,139,255,0.35);
}

.ifb-map-pin {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -100%);
}

.ifb-map-badge {
  position: absolute;
  left: 14px; top: 14px;
  background: rgba(255,255,255,0.95);
  border-radius: var(--ifb-radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #10B981;
}

/* ── Step 6 – Notes ─────────────────────────────────── */
.ifb-textarea { resize: none; line-height: 1.6; }

.ifb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

button.ifb-chip[type="button"],
button.ifb-chip,
.ifb-chips button.ifb-chip,
.ifb-chip,
.ifb-tag {
  background: var(--ifb-bg-card) !important;
  border: 1.5px solid #0652DD !important;
  color: #0652DD !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 8px 16px !important;
  border-radius: var(--ifb-radius-pill) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  font-family: inherit !important;
  outline: none !important;
  box-shadow: none !important;
}

button.ifb-chip[type="button"]:hover,
button.ifb-chip[type="button"]:focus,
button.ifb-chip:hover,
button.ifb-chip:focus,
.ifb-chips button.ifb-chip:hover,
.ifb-chips button.ifb-chip:focus,
.ifb-chip:hover,
.ifb-tag:hover {
  background: #0652DD !important;
  color: #ffffff !important;
  border-color: #0652DD !important;
}

/* ── Step 7 – Payment ───────────────────────────────── */
.ifb-checkout-block {
  background: var(--ifb-bg-canvas);
  border-radius: var(--ifb-radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.ifb-checkout-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--ifb-border);
}

.ifb-checkout-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--ifb-radius-md);
  background: var(--ifb-bg-selected);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ifb-primary);
  flex-shrink: 0;
}

.ifb-checkout-label {
  font-size: 13px;
  color: var(--ifb-text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.ifb-checkout-val {
  font-size: 15px;
  color: var(--ifb-text-main);
  font-weight: 700;
}

.ifb-checkout-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 16px;
}

.ifb-checkout-total-label {
  font-weight: 800;
  font-size: 18px;
}

.ifb-card-input-row {
  border: 1px solid var(--ifb-border);
  border-radius: var(--ifb-radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ifb-bg-card);
  margin-top: 8px;
}

.ifb-card-placeholder { color: var(--ifb-text-light); font-size: 15px; }

.ifb-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 13px;
  color: var(--ifb-text-muted);
  font-weight: 500;
}

/* ── Nav bar ────────────────────────────────────────── */
.ifb-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--ifb-border);
}

.ifb-back-btn {
  font-weight: 600 !important;
  font-size: 15px !important;
  color: var(--ifb-text-muted) !important;
  cursor: pointer !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px !important;
  transition: color 0.2s !important;
  font-family: inherit !important;
}

.ifb-back-btn:hover { color: #0652DD !important; }

.ifb-back-btn.is-disabled {
  color: var(--ifb-border);
  cursor: default;
  pointer-events: none;
}

.ifb-next-btn {
  background: #0652DD !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  padding: 14px 28px !important;
  border-radius: var(--ifb-radius-pill) !important;
  cursor: pointer !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  transition: background 0.2s, transform 0.1s !important;
  font-family: inherit !important;
}

.ifb-next-btn:hover { background: #0543B3 !important; }
.ifb-next-btn:active { transform: scale(0.98) !important; }

/* ── Success state ──────────────────────────────────── */
.ifb-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 40px;
  flex: 1;
  min-height: 400px;
}

.ifb-success-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--ifb-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}

/* ── WooCommerce Checkout Page Custom Tweaks ───────────────────────── */

/* 1. Force expanded billing/shipping form fields by default */
.wc-block-components-address-card {
  display: none !important;
}

/* 2. Brand color #0652DD on Checkout Buttons */
/* Place Order Button (Classic & Block Checkout) */
#place_order,
.wc-block-components-checkout-place-order-button,
.wc-block-components-checkout-place-order-button button,
.wc-block-components-button.wc-block-components-checkout-place-order-button {
  background-color: #0652DD !important;
  color: #ffffff !important;
  border: 1px solid #0652DD !important;
  background: #0652DD !important;
}

#place_order:hover,
#place_order:focus,
.wc-block-components-checkout-place-order-button:hover,
.wc-block-components-checkout-place-order-button button:hover,
.wc-block-components-checkout-place-order-button:focus,
.wc-block-components-checkout-place-order-button button:focus,
.wc-block-components-button.wc-block-components-checkout-place-order-button:hover,
.wc-block-components-button.wc-block-components-checkout-place-order-button:focus {
  background-color: #043bb0 !important;
  background: #043bb0 !important;
  border-color: #043bb0 !important;
  color: #ffffff !important;
}

/* Edit links, outline buttons, secondary buttons and pink/red overrides */
.wc-block-components-checkout-place-order-button,
.wc-block-components-checkout-place-order-button button,
.wc-block-components-button.wc-block-components-checkout-place-order-button {
  border-color: #0652DD !important;
}

/* Override WooCommerce block elements with pink/red colors */
.wc-block-checkout a,
.wc-block-checkout button,
.wc-block-components-address-card__edit,
.wc-block-components-button,
.wc-block-components-checkout-place-order-button {
  --wp--preset--color--primary: #0652DD !important;
  --wp--preset--color--secondary: #0652DD !important;
}

/* Any pink/red outlines or text colors to #0652DD */
.wc-block-components-button.is-outline,
.wc-block-components-address-card__edit,
.wc-block-components-button.is-secondary,
.woocommerce-checkout .button.alt,
.woocommerce-checkout .button:not(.alt),
.wc-block-components-checkbox-label a {
  color: #0652DD !important;
  border-color: #0652DD !important;
}
.wc-block-components-button.is-outline:hover,
.wc-block-components-button.is-secondary:hover {
  background-color: #0652DD !important;
  color: #ffffff !important;
  border-color: #0652DD !important;
}
