/* ============================================
   CYPRUS TAXI BOOKING - BOOTSTRAP 5 INTEGRATED
   Professional Gold Theme with Bootstrap Components
   ============================================ */

:root {
  --bs-warning: #d4af37;
  --bs-warning-rgb: 212, 175, 55;
  --gold-primary: #d4af37;
  --gold-light: #f4d47c;
  --gold-dark: #b8941f;
}

/* ============================================
   STEP PROGRESS BAR
   ============================================ */

.ctb-steps-header {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  padding: 2rem 0;
}

/* Full width container for steps */
.ctb-steps-header .row {
  max-width: 1200px;
  /* Match your form max-width */
  margin: 0 auto;
}

/* Distribute steps evenly across full width */
.ctb-steps-header .d-flex {
  width: 100%;
  max-width: 900px;
  justify-content: space-between !important;
  /* Spread steps across full width */
  align-items: center;
  margin: 0 auto;
  padding-left: 10px;
  padding-right: 10px;
}

.ctb-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  /* Don't grow or shrink */
}

/* Make step lines grow to fill space between steps */
.ctb-step-line {
  flex: 1 1 auto;
  /* Grow to fill available space */
  height: 2px;
  min-width: 60px;
  /* Minimum width */
  margin: 0 1.5rem;
  /* Space from step circles */
  margin-bottom: 30px;
  /* Align with step number vertically */
  background: #6c757d;
  transition: background 0.3s ease;
}

.ctb-step-number {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  transition: all 0.3s ease;
  border: 3px solid transparent;
  position: relative;
}

/* Active state */
.ctb-step.active .ctb-step-number {
  background: var(--gold-primary) !important;
  color: #1a1a1a !important;
  border-color: var(--gold-primary) !important;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.5) !important;
}

.ctb-step.active .ctb-step-title {
  color: var(--gold-primary) !important;
  font-weight: 700 !important;
}

/* Completed state */
.ctb-step.completed .ctb-step-number {
  background: var(--gold-primary) !important;
  color: #1a1a1a !important;
  border-color: var(--gold-dark);
}

.ctb-step.completed .ctb-step-number::before {
  content: "\2713";
  position: absolute;
  font-size: 24px;
  font-weight: 700;
}

.ctb-step.completed .ctb-step-number span {
  display: none;
}

/* Completed line - gold color */
.ctb-step.completed+.ctb-step-line {
  background: var(--gold-primary) !important;
}

.ctb-step-title {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s ease;
}

.ctb-step.completed+.ctb-step-line {
  background: var(--gold-primary) !important;
}

/* ============================================
   FORM STEPS
   ============================================ */

.ctb-step-content {
  display: none;
}

.ctb-step-content.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   BOOTSTRAP OVERRIDES - GOLD THEME
   ============================================ */

.btn-warning {
  background: linear-gradient(135deg,
      var(--gold-primary) 0%,
      var(--gold-light) 100%);
  border-color: var(--gold-primary);
  color: #1a1a1a;
  font-weight: 700;
}

.btn-warning:hover {
  background: linear-gradient(135deg,
      var(--gold-light) 0%,
      var(--gold-primary) 100%);
  border-color: var(--gold-dark);
  color: #1a1a1a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-outline-warning {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  border-width: 2px;
}

.btn-outline-warning:hover,
.btn-outline-warning:focus,
.btn-outline-warning.active,
.btn-check:checked+.btn-outline-warning {
  background: linear-gradient(135deg,
      var(--gold-primary) 0%,
      var(--gold-light) 100%);
  border-color: var(--gold-primary);
  color: #1a1a1a;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.text-warning {
  color: var(--gold-primary) !important;
}

.bg-warning {
  background: var(--gold-primary) !important;
}

/* ============================================
   CARD STYLING
   ============================================ */

.card {
  border: none;
  border-radius: 12px;
}

.card-header {
  border-radius: 12px 12px 0 0 !important;
  border-bottom: 2px solid var(--gold-dark);
}

.sticky-top {
  position: sticky;
  top: 20px;
  z-index: 10;
}

/* ============================================
   FORM CONTROLS
   ============================================ */

.form-control:focus,
.form-select:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
}

/* Route dropdown - better visibility */
.form-select {
  color: #1a1a1a;
  font-weight: 500;
}

.form-select option {
  color: #1a1a1a;
  padding: 12px;
  font-size: 1.1rem;
  font-weight: 500;
}

.form-select:invalid {
  color: #6c757d;
}

/* Summary total price - always black */
#summary-total-price {
  color: #1a1a1a !important;
  font-weight: 500 !important;
}

/* Time separator colon - proper sizing */
.input-group-text {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
}

.form-check-input:checked {
  background-color: var(--gold-primary);
  border-color: var(--gold-primary);
}

.form-check-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
}

/* ============================================
   VEHICLE CARDS
   ============================================ */

.ctb-vehicle-card-item {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
  background: #fff;
}

.ctb-vehicle-card-item:hover {
  border-color: var(--gold-primary);
  box-shadow: 0 6px 25px rgba(212, 175, 55, 0.2);
  transform: translateY(-3px);
}

.ctb-vehicle-card-item.selected {
  border-color: var(--gold-primary);
  background: linear-gradient(135deg,
      rgba(212, 175, 55, 0.08) 0%,
      rgba(232, 199, 111, 0.04) 100%);
  box-shadow: 0 6px 25px rgba(212, 175, 55, 0.3);
}

.ctb-vehicle-image-wrapper {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.ctb-vehicle-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.ctb-vehicle-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 10px;
}

.ctb-vehicle-specs {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.ctb-vehicle-spec {
  font-size: 14px;
  color: #6b7280;
}

.ctb-vehicle-price-section {
  text-align: center;
  margin-top: 15px;
}

.ctb-vehicle-price-label {
  font-size: 12px;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  font-weight: 600;
}

.ctb-vehicle-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--gold-primary);
  margin-bottom: 12px;
}

.ctb-btn-select {
  width: 100%;
}

.ctb-vehicle-card-item.selected .ctb-btn-select {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: var(--gold-primary);
}

/* Vehicle filtering states */
.ctb-vehicle-hidden {
  display: none !important;
}

.ctb-vehicle-disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ============================================
   NUMBER INPUT CONTROLS
   ============================================ */

.ctb-number-btn {
  min-width: 50px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  font-size: 1.25rem;
}

.ctb-number-btn:hover {
  background-color: var(--gold-primary);
  border-color: var(--gold-primary);
  color: #1a1a1a;
  transform: scale(1.05);
}

.ctb-number-btn:active {
  transform: scale(0.95);
}

.input-group .form-control {
  border-left: 0 !important;
  border-right: 0 !important;
}

.input-group .ctb-number-btn:first-child {
  border-right: 0;
}

.input-group .ctb-number-btn:last-child {
  border-left: 0;
}

/* ============================================
   ERROR MESSAGES - ✅ UPDATED: Auto-hide on correction
   ============================================ */

.invalid-feedback {
  display: none;
  color: #dc3545;
  font-size: 14px;
  margin-top: 6px;
  transition: opacity 0.3s ease;
}

.invalid-feedback.show {
  display: block !important;
  opacity: 1;
}

.invalid-feedback.hide {
  opacity: 0;
  display: none !important;
}

.is-invalid,
.ctb-field-error {
  border-color: #dc3545 !important;
}

/* ============================================
   RETURN DETAILS ANIMATION
   ============================================ */

#return-details-container {
  overflow: hidden;
  transition: all 0.3s ease;
}

/* ============================================
   PAYMENT OPTIONS
   ============================================ */

#card-payment-details {
  transition: all 0.3s ease;
}

#card-element {
  padding: 12px;
  background: #fff;
}

/* ============================================
   SUMMARY SIDEBAR
   ============================================ */

.card-header.bg-dark {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
}

#summary-total-section .bg-warning {
  background: linear-gradient(135deg,
      var(--gold-primary) 0%,
      var(--gold-light) 100%) !important;
}

/* ============================================
   LOADING STATES
   ============================================ */

.ctb-loading-text {
  text-align: center;
  padding: 40px;
  color: var(--gold-primary);
  font-size: 16px;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

/* Tablet landscape and small desktop */
@media (max-width: 991px) {
  .ctb-steps-header {
    padding: 1.75rem 1rem;
  }

  .ctb-steps-header .d-flex {
    width: 100%;
    max-width: 100%;
    padding: 0 1rem;
  }

  .ctb-step {
    min-width: auto;
    flex: 0 0 auto;
  }

  .ctb-step-number {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }

  .ctb-step-title {
    font-size: 11px;
    max-width: 80px;
  }

  .ctb-step-line {
    min-width: 30px;
    max-width: 60px;
    margin: 0 1rem;
  }

  .sticky-top {
    position: static;
  }
}

/* Tablet portrait */
@media (min-width: 768px) and (max-width: 991px) {
  .ctb-step-number {
    width: 42px;
    height: 42px;
    font-size: 15px;
  }

  .ctb-step-title {
    font-size: 10px;
  }

  .ctb-step-line {
    min-width: 25px;
    max-width: 50px;
    margin: 0 0.85rem;
  }
}

@media (max-width: 767px) {
  .ctb-steps-header {
    padding: 1.5rem 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.3) transparent;
  }

  /* Webkit scrollbar styling */
  .ctb-steps-header::-webkit-scrollbar {
    height: 4px;
  }

  .ctb-steps-header::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
  }

  .ctb-steps-header::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.5);
    border-radius: 2px;
  }

  .ctb-steps-header::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.7);
  }

  .ctb-step {
    min-width: auto;
    flex: 0 0 auto;
  }

  .ctb-step-number {
    width: 36px;
    height: 36px;
    font-size: 14px;
    margin-bottom: 6px;
  }

  .ctb-step-title {
    font-size: 9px;
    max-width: 60px;
    white-space: normal;
    line-height: 1.2;
  }

  .ctb-step-line {
    min-width: 20px;
    max-width: 30px;
    margin: 0 0.5rem;
    margin-bottom: 24px;
  }

  /* Adjust container to show all steps with scroll */
  .ctb-steps-header .d-flex {
    width: auto;
    min-width: auto;
    padding: 0 1rem;
    justify-content: flex-start !important;
    gap: 0;
  }

  /* Reduce row padding on mobile */
  .ctb-steps-header .row {
    margin: 0;
    width: 100%;
  }

  .ctb-vehicle-card-item {
    padding: 15px;
  }

  .ctb-vehicle-image-wrapper {
    height: 120px;
  }

  .ctb-steps-header {
    margin-bottom: 20px;
  }
}

/* Extra small screens - even more compact */
@media (max-width: 480px) {
  .ctb-steps-header {
    padding: 1.25rem 0.25rem;
  }

  .ctb-step-number {
    width: 32px;
    height: 32px;
    font-size: 12px;
    margin-bottom: 4px;
    border-width: 2px;
  }

  .ctb-step-title {
    font-size: 8px;
    max-width: 50px;
  }

  .ctb-step-line {
    min-width: 15px;
    max-width: 25px;
    margin: 0 0.35rem;
    margin-bottom: 20px;
  }

  .ctb-steps-header .d-flex {
    padding: 0 0.5rem;
  }
}

/* ============================================
   INTERNATIONAL PHONE INPUT
   ============================================ */

.iti {
  width: 100%;
  display: block;
}

.iti__flag-container {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  padding: 0;
}

.iti__selected-flag {
  padding: 0 10px;
  height: 100%;
  display: flex;
  align-items: center;
  background: rgba(26, 26, 26, 0.05);
  border-right: 2px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px 0 0 8px;
}

.iti__selected-flag:hover {
  background: rgba(212, 175, 55, 0.1);
}

#customer-phone {
  padding-left: 75px !important;
}

.iti__country-list {
  background: #fff;
  border: 1px solid var(--gold-primary);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  max-height: 220px;
}

.iti__country:hover,
.iti__country.iti__highlight {
  background: rgba(212, 175, 55, 0.1);
}

.iti__country.iti__active {
  background: rgba(212, 175, 55, 0.2);
}

.iti__dial-code {
  color: var(--gold-primary);
  font-weight: 600;
}

/* ============================================
   DISCOUNT STYLING
   ============================================ */

#summary-discount-section {
  border-top: 1px dashed var(--gold-primary);
  padding-top: 12px;
}

.text-success {
  color: #16a34a !important;
}

/* ============================================
   UTILITIES
   ============================================ */

.fw-semibold {
  font-weight: 600;
}

.rounded-top {
  border-radius: 12px 12px 0 0 !important;
}

.shadow-sm {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {

  .ctb-steps-header,
  .sticky-top,
  button {
    display: none !important;
  }
}