/**
 * Cyprus Taxi Booking - Quick Booking Form
 * Grid Layout: Addresses row + Date/Time/Type row
 */

/* ============================================
   UAGB CONTAINER OVERRIDE
   ============================================ */

.uagb-container-inner-blocks-wrap,
.wp-block-uagb-container,
body .uagb-container-inner-blocks-wrap,
body .wp-block-uagb-container {
  overflow: visible !important;
  max-width: none !important;
}

/* ============================================
   WRAPPER & CONTAINER
   ============================================ */

.ctb-quick-booking-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  background: transparent;
  box-sizing: border-box;
}

.ctb-quick-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ============================================
   FORM - CARD STYLE WITH BORDERED GRID
   ============================================ */

.ctb-quick-form {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

/* ============================================
   ROWS
   ============================================ */

.ctb-quick-row {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
}

/* ============================================
   CELLS - GRID CELLS WITH BORDERS
   ============================================ */

.ctb-quick-cell {
  flex: 1;
  padding: 16px 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

/* Address cells are taller */
.ctb-quick-cell-address {
  padding: 18px 24px;
}

/* Submit row - full width */
.ctb-quick-row-submit .ctb-quick-cell-submit {
  flex: 1;
  padding: 16px 24px;
}

/* Spacer cell - empty placeholder to maintain grid alignment */
.ctb-quick-cell-spacer {
  pointer-events: none;
}

/* Border between cells */
.ctb-quick-cell-border-left {
  border-left: 1px solid #e5e7eb;
}

.ctb-quick-cell-border-top {
  border-top: 1px solid #e5e7eb;
}

/* ============================================
   LABELS
   ============================================ */

.ctb-quick-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 6px;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.4;
}

.ctb-quick-label i {
  font-size: 15px;
}

.ctb-icon-pickup {
  color: #f59e0b !important;
}

.ctb-icon-dropoff {
  color: #ef4444 !important;
}

.ctb-required {
  color: #ef4444;
  margin-left: 2px;
}

/* ============================================
   TEXT INPUTS
   ============================================ */

.ctb-quick-input {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 4px 0 !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  color: #1f2937 !important;
  background: transparent !important;
  width: 100% !important;
  box-sizing: border-box !important;
  line-height: 1.5 !important;
}

.ctb-quick-input::placeholder {
  color: #9ca3af !important;
  font-weight: 400 !important;
}

.ctb-quick-input:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Error state - highlight the cell */
.ctb-quick-input.is-invalid,
.ctb-quick-input.ctb-field-error {
  color: #dc2626 !important;
}

/* ============================================
   SELECT DROPDOWNS
   ============================================ */

.ctb-quick-select {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 4px 0 !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  color: #1f2937 !important;
  background: transparent !important;
  width: 100% !important;
  box-sizing: border-box !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  cursor: pointer !important;
  line-height: 1.5 !important;
}

.ctb-quick-select:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* ============================================
   TIME GROUP (HH:MM)
   ============================================ */

.ctb-quick-time-group {
  display: flex;
  align-items: center;
  gap: 0;
}

.ctb-quick-time-group .ctb-quick-select {
  flex: 1;
  text-align: center;
}

.ctb-quick-time-sep {
  color: #9ca3af;
  font-weight: 600;
  font-size: 16px;
  padding: 0 4px;
  flex-shrink: 0;
}

/* ============================================
   SUBMIT BUTTON
   ============================================ */

.ctb-quick-btn-submit {
  background: linear-gradient(135deg, #d4af37 0%, #f4d47c 100%) !important;
  border: none !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  text-transform: uppercase !important;
  letter-spacing: 1.2px !important;
  padding: 14px 24px !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3) !important;
  white-space: nowrap !important;
  width: 100% !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 46px !important;
}

.ctb-quick-btn-submit:hover {
  background: linear-gradient(135deg, #c19b2e 0%, #e3c36b 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4) !important;
  color: #ffffff !important;
}

.ctb-quick-btn-submit:active {
  transform: translateY(0) !important;
}

/* ============================================
   ERROR MESSAGES
   ============================================ */

.ctb-quick-error {
  display: none;
  font-size: 11px;
  color: #dc2626;
  margin-top: 3px;
  line-height: 1.3;
}

.ctb-quick-error.show,
.ctb-quick-error.d-block {
  display: block;
}

/* ============================================
   RETURN FIELDS ROW - CONDITIONAL
   ============================================ */

.ctb-quick-row-return {
  transition: all 0.3s ease;
}

.ctb-quick-row-return.d-none {
  display: none !important;
}

/* ✅ Visible state */
.ctb-quick-row-return.ctb-return-visible {
  display: flex !important;
}

/* ✅ Hidden state for animation */
.ctb-quick-row-return.ctb-return-hidden {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
}

/* Return cells take same width as date/time in row 2 */
.ctb-quick-row-return .ctb-quick-cell {
  flex: 1;
}

/* ============================================
   CELL HOVER EFFECT
   ============================================ */

.ctb-quick-cell:not(.ctb-quick-cell-submit):hover {
  background-color: #fafafa;
}

/* Focus state - highlight active cell */
.ctb-quick-cell:focus-within:not(.ctb-quick-cell-submit) {
  background-color: #fffbeb;
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */

@media (max-width: 1024px) {
  .ctb-quick-booking-wrapper {
    padding: 30px 15px;
  }

  .ctb-quick-cell {
    padding: 14px 16px;
  }

  .ctb-quick-cell-address {
    padding: 16px 18px;
  }

  .ctb-quick-input,
  .ctb-quick-select {
    font-size: 14px !important;
  }
}

/* ============================================
   RESPONSIVE - MOBILE (Stack vertically)
   ============================================ */

@media (max-width: 768px) {
  .ctb-quick-booking-wrapper {
    padding: 20px 10px;
  }

  .ctb-quick-row {
    flex-wrap: wrap;
    flex-direction: column;
  }

  .ctb-quick-cell {
    width: 100%;
    border-left: none !important;
    padding: 14px 18px;
  }

  .ctb-quick-cell-border-top {
    border-top: 1px solid #e5e7eb;
  }

  .ctb-quick-cell-address {
    padding: 14px 18px;
  }

  /* Hide spacer on mobile */
  .ctb-quick-cell-spacer {
    display: none !important;
  }

  .ctb-quick-label {
    font-size: 12px;
  }
}

/* ============================================
   BOOTSTRAP ICONS
   ============================================ */

@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.0/font/bootstrap-icons.css");
