:root {
  /* Shared public CTA colors — keep Lead Type badges in sync with branch/vehicle action buttons. */
  --cta-whatsapp: #25d366;
  --cta-whatsapp-hover: #1fb85a;
  --cta-call: #f15a24;
  --cta-call-hover: #dc4f1c;
  --cta-maps: #176873;
  --cta-maps-hover: #145a63;

  /* Shared rental-office logo container (Vehicle card + Office card). */
  --rental-office-logo-ratio: 1.45 / 1;
  --rental-office-logo-height: 60px;
}

/* Standardized rental-office logo container — used by both card types. */
.office-card-logo-wrap,
.fleet-card-office-logo-wrap {
  aspect-ratio: var(--rental-office-logo-ratio);
  height: var(--rental-office-logo-height);
  width: calc(var(--rental-office-logo-height) * 1.45);
  min-height: var(--rental-office-logo-height);
  min-width: calc(var(--rental-office-logo-height) * 1.45);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-sizing: border-box;
}

.office-card-logo,
.fleet-card-office-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.btn.btn-primary.w-100 {
  --bs-btn-color: #ffffff;
  --bs-btn-bg: #176873;
  --bs-btn-border-color: #176873;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #145a63;
  --bs-btn-hover-border-color: #145a63;
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: #145a63;
  --bs-btn-active-border-color: #145a63;
  --bs-btn-disabled-color: #ffffff;
  --bs-btn-disabled-bg: #176873;
  --bs-btn-disabled-border-color: #176873;
  color: #ffffff;
  background-color: #176873;
  border-color: #176873;
}

.btn.btn-primary.w-100:hover,
.btn.btn-primary.w-100:focus,
.btn.btn-primary.w-100:active,
.btn.btn-primary.w-100:active:focus {
  color: #ffffff;
  background-color: #145a63;
  border-color: #145a63;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Phone numbers / dialing codes must stay LTR inside Arabic RTL pages. */
.phone-ltr {
  direction: ltr;
  unicode-bidi: isolate;
}

.phone-ltr .phone-country-picker,
.phone-ltr .phone-country-picker-trigger,
.phone-ltr .phone-country-picker-selected,
.phone-ltr .phone-country-picker-menu,
.phone-ltr .phone-country-picker-option,
.phone-ltr .international-phone-row,
.phone-ltr .international-phone-country,
.phone-ltr .international-phone-local,
.phone-ltr input,
.phone-ltr select,
.phone-ltr textarea {
  direction: ltr;
}

.phone-ltr input,
.phone-ltr textarea,
.phone-ltr select {
  text-align: left;
}

/* Shared searchable phone country picker (admin + public). */
.phone-country-picker {
  position: relative;
  flex: 0 0 auto;
  z-index: 20;
}

.phone-country-picker.is-open {
  z-index: 40;
}

.phone-country-picker-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  min-width: 108px;
  height: 100%;
  min-height: 48px;
  padding: 0.55rem 0.75rem;
  border: 1.5px solid #e2e8f0;
  border-right: 0;
  border-radius: 12px 0 0 12px;
  background: #fff;
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.phone-country-picker-trigger:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.phone-country-picker-trigger:focus,
.phone-country-picker.is-open .phone-country-picker-trigger {
  outline: 0;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  background: #fff;
}

.phone-country-picker-selected {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.phone-country-picker-flag {
  font-size: 1.05rem;
  line-height: 1;
}

.phone-country-picker-code {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.phone-country-picker-chevron {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.phone-country-picker.is-open .phone-country-picker-chevron {
  transform: rotate(225deg) translateY(1px);
  border-color: #2563eb;
}

.phone-country-picker-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  width: min(420px, calc(100vw - 2rem));
  padding: 0.55rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #fff;
  box-shadow:
    0 18px 48px rgba(15, 23, 42, 0.14),
    0 6px 18px rgba(15, 23, 42, 0.08);
}

.phone-country-picker-search-wrap {
  position: relative;
  margin-bottom: 0.45rem;
}

.phone-country-picker-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  width: 0.95rem;
  height: 0.95rem;
  transform: translateY(-50%);
  opacity: 0.55;
  pointer-events: none;
  background:
    radial-gradient(circle at 38% 38%, #64748b 0 38%, transparent 40%),
    linear-gradient(45deg, transparent 44%, #64748b 44%, #64748b 56%, transparent 56%);
}

.phone-country-picker-search {
  min-height: 42px;
  padding-left: 2.35rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.92rem;
  box-shadow: none;
}

.phone-country-picker-search:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.phone-country-picker-list {
  list-style: none;
  margin: 0;
  padding: 0.15rem;
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.phone-country-picker-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.62rem 0.7rem;
  border-radius: 10px;
  cursor: pointer;
  color: #0f172a;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.phone-country-picker-option-main {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.phone-country-picker-option-flag {
  flex-shrink: 0;
  font-size: 1.05rem;
  line-height: 1;
}

.phone-country-picker-option-name {
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-country-picker-option-code {
  flex-shrink: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #475569;
  font-variant-numeric: tabular-nums;
}

.phone-country-picker-option:hover,
.phone-country-picker-option.is-active {
  background: #f1f5f9;
}

.phone-country-picker-option.is-selected {
  background: rgba(37, 99, 235, 0.08);
}

.phone-country-picker-option.is-selected .phone-country-picker-option-code {
  color: #1d4ed8;
}

.phone-country-picker-empty {
  padding: 1rem 0.75rem;
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
}
