/* ============================================
   SWITCHCORNER FORMS STYLES
   Request Card, Request Group, Transfers
   ============================================ */

/* --- Hero Section --- */
.form-hero {
  position: relative;
  padding: 42px 0 84px;
  background: #fff;
  overflow: hidden;
}

.form-hero::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: 0;
  right: 0;
  height: 100px;
  background: #f8f9fa;
  transform: skewY(-1deg);
}

.form-hero .container {
  position: relative;
  z-index: 2;
}

.form-hero-content {
  text-align: center;
  color: #303539;
  animation: fadeInUp 0.6s ease-out;
}

.form-hero-icon {
  width: 80px;
  height: 80px;
  background: rgba(171, 128, 28, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.form-hero-icon svg {
  width: 40px;
  height: 40px;
  fill: #AB801C;
}

.form-hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  color: #303539;
}

.form-hero-subtitle {
  font-size: 1.125rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

.form-breadcrumb {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.form-breadcrumb a {
  color:#303539;
  text-decoration: none;
  transition: color 0.3s ease;
}

.form-breadcrumb a:hover {
  color: #AB801C;
}

.form-breadcrumb span {
  color: #303539;
}

.form-breadcrumb .current {
  color: #303539;
}

/* --- Form Section --- */
.form-section {
  padding: 60px 0;
  background: #f8f9fa;
  min-height: 70vh;
}

.form-wrapper {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
}

/* Main Form Box */
.form-main-box {
  background: #fff;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
}

/* Form Section Headers */
.form-section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f0f0f0;
}

.form-section-header:not(:first-child) {
  margin-top: 0.5rem;
}

.form-section-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #fdf8f0 0%, #f9f0e0 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.form-section-icon svg {
  width: 14px;
  height: 14px;
  fill: #AB801C;
}

.form-section-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #303539;
  margin: 0;
}

/* Form Fields */
.form-main-box .form-label {
  font-weight: 600;
  color: #303539;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  display: block;
}

.form-main-box .form-control,
.form-main-box .form-select {
  height: 48px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  /* background: #f8f9fa; */
}

.form-main-box .form-control:focus,
.form-main-box .form-select:focus {
  border-color: #AB801C;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(171, 128, 28, 0.1);
}

.form-main-box .select2-container {
  width: 100% !important;
}

.form-main-box .select2-container--default .select2-selection--single {
  height: 48px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: #fff;
}

.form-main-box .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 30px;
  padding-left: 0;
  color: #212529;
}

.form-main-box .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 44px;
  right: 8px;
}

.form-main-box .select2-container--default.select2-container--focus .select2-selection--single,
.form-main-box .select2-container--default.select2-container--open .select2-selection--single {
  border-color: #AB801C;
  box-shadow: 0 0 0 4px rgba(171, 128, 28, 0.1);
}

.form-main-box textarea.form-control {
  height: auto;
  min-height: 100px;
  resize: vertical;
}

.form-main-box .form-control::placeholder {
  color: #adb5bd;
}

.form-text-counter {
  display: block;
  text-align: right;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: #6c757d;
}

/* Phone Dial Code Input Group */
.phone-input-group {
  display: flex;
  align-items: stretch;
}

.phone-dial-select {
  flex: 0 0 auto;
  width: auto;
  min-width: 100px;
  max-width: 130px;
  border-right: none !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  font-size: 0.85rem !important;
  padding-left: 0.5rem !important;
  padding-right: 0.25rem !important;
}

.phone-input-group .form-control {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-left: 1px solid #dee2e6 !important;
}

.phone-input-group .phone-dial-select:focus {
  z-index: 3;
  border-color: #AB801C !important;
  box-shadow: 0 0 0 4px rgba(171, 128, 28, 0.1) !important;
}

.phone-input-group .form-control:focus {
  z-index: 3;
}

/* Form Check/Radio */
.form-main-box .form-check {
  padding-left: 1.75rem;
}

.form-main-box .form-check-input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
  border: 2px solid #dee2e6;
  cursor: pointer;
}

.form-main-box .form-check-input:checked {
  background-color: #AB801C;
  border-color: #AB801C;
}

.form-main-box .form-check-input:focus {
  box-shadow: 0 0 0 4px rgba(171, 128, 28, 0.15);
}

.form-main-box .form-check-label {
  cursor: pointer;
  color: #4a5568;
}

/* Trip Type Toggle */
.trip-type-toggle {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.trip-type-toggle .form-check {
  flex: 1;
  margin: 0;
  padding: 0;
}

.trip-type-toggle .form-check-input {
  display: none;
}

.trip-type-toggle .form-check-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: transparent;
  transition: all 0.3s ease;
  width: 100%;
  text-align: center;
  font-weight: 500;
}

.trip-type-toggle .form-check-input:checked + .form-check-label {
  background: #303539;
  color: #fff;
}

.trip-type-toggle .form-check-label svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Destination Row Styling */
.destination-row {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.destination-row:hover {
  border-color: #AB801C;
  background: #fafdf5;
}

.destination-row .row-number {
  width: 28px;
  height: 28px;
  background: #303539;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
}

/* Submit Button */
.btn-form-submit {
  height: 56px;
  background: linear-gradient(135deg, #AB801C 0%, #8a6616 100%);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-weight: 600;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  padding: 0 2rem;
}

.btn-form-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-form-submit:hover::before {
  left: 100%;
}

.btn-form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(171, 128, 28, 0.4);
}

.btn-form-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-form-submit svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: transform 0.3s ease;
}

.btn-form-submit:hover svg {
  transform: translateX(4px);
}

/* Form Result */
.form-result {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  font-weight: 500;
}

.form-result:empty {
  display: none;
}

.form-result.success {
  background: #d4edda;
  color: #155724;
}

.form-result.error {
  background: #f8d7da;
  color: #721c24;
}

/* --- Sidebar --- */
.form-sidebar {
  position: sticky;
  top: 100px;
}

/* Help Card */
.form-help-card {
  background: linear-gradient(135deg, #303539 0%, #1a2850 100%);
  border-radius: 20px;
  padding: 2rem;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.form-help-card-content {
  position: relative;
  z-index: 2;
}

.form-help-icon {
  width: 70px;
  height: 70px;
  background: rgba(171, 128, 28, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.form-help-icon svg {
  width: 32px;
  height: 32px;
  fill: #AB801C;
}

.form-help-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #fff;
}

.form-help-card p {
  opacity: 0.9;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.form-help-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #AB801C;
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.form-help-btn:hover {
  background: #8a6616;
  color: #fff;
  transform: translateY(-2px);
}

.form-help-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Info Card */
.form-info-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.form-info-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #303539;
  margin-bottom: 0px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-info-card h4 svg {
  width: 20px;
  height: 20px;
  fill: #AB801C;
}

.form-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.form-info-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size:0.85rem;
    color: #6c757d;
}

.form-info-list li:last-child {
  border-bottom: none;
}

.form-info-list li svg {
  width: 16px;
  height: 16px;
  fill: #AB801C;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Quick Contact */
.form-quick-contact {
  margin-top: 1.5rem;
}

.form-quick-contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 10px;
  margin-bottom: 0.75rem;
  transition: all 0.3s ease;
}

.form-quick-contact-item:hover {
  background: #fdf8f0;
}

.form-quick-contact-item:last-child {
  margin-bottom: 0;
}

.form-quick-contact-item .icon {
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.form-quick-contact-item .icon svg {
  width: 18px;
  height: 18px;
  fill: #AB801C;
}

.form-quick-contact-item .text {
  flex: 1;
}

.form-quick-contact-item .label {
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-quick-contact-item .value {
  font-weight: 600;
  color: #303539;
  font-size: 0.9rem;
}

.form-quick-contact-item .value a {
  color: #303539;
  text-decoration: none;
  transition: color 0.3s ease;
}

.form-quick-contact-item .value a:hover {
  color: #AB801C;
}

/* --- Mobile Product Summary Banner (makePrebook) --- */
.prebook-mobile-summary {
  background: #303539;
  color: #fff;
  padding: 0.75rem 0;
}

.prebook-mobile-summary-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.prebook-mobile-summary-name {
  font-weight: 600;
  font-size: 0.9rem;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prebook-mobile-summary-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  font-size: 0.8rem;
  opacity: 0.85;
}

.prebook-mobile-summary-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.prebook-mobile-summary-price {
  color: #AB801C;
  font-weight: 700;
  font-size: 0.95rem !important;
  opacity: 1 !important;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-fade-up.animated {
  opacity: 1;
  transform: translateY(0);
}

.animate-fade-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-fade-left.animated {
  opacity: 1;
  transform: translateX(0);
}

.animate-fade-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-fade-right.animated {
  opacity: 1;
  transform: translateX(0);
}

/* --- FormValidation States --- */

/* Column wrappers need position:relative so the help-block tooltip anchors below the field */
.form-main-box .row > [class*="col-"] {
  position: relative;
}

/* Error state — input border + background */
.form-main-box .has-error .form-control,
.form-main-box .has-error .form-select {
  background: #fff4f3;
}

.form-main-box .has-error .form-control:focus,
.form-main-box .has-error .form-select:focus {
  /* border-color: #f04c41; */
  box-shadow: 0 0 0 4px rgba(240, 76, 65, 0.12);
}

.form-main-box .has-error .form-label {
  color: #f04c41;
}

/* Success state — input border + background */
.form-main-box .has-success .form-control,
.form-main-box .has-success .form-select {
  border-color: #28a745;
  background: #f6fff8;
}

.form-main-box .has-success .form-control:focus,
.form-main-box .has-success .form-select:focus {
  border-color: #28a745;
  box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.12);
}

.form-main-box .has-success .form-label {
  color: #28a745;
}

/* --- Responsive --- */
@media (max-width: 991.98px) {
  .form-hero {
    padding: 32px 0 60px;
  }

  .form-hero-title {
    font-size: 2rem;
  }

  .form-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .form-sidebar {
    position: static;
    /* no order override — sidebar stays below the form on mobile */
  }

  .form-help-card {
    display: none;
  }

  .form-main-box {
    padding: 1.5rem;
  }
}

@media (max-width: 767.98px) {
  .form-section {
    padding: 30px 0 40px;
  }

  .form-hero-title {
    font-size: 1.5rem;
  }

  .form-hero-subtitle {
    font-size: 0.95rem;
  }

  .form-hero-icon {
    width: 60px;
    height: 60px;
  }

  .form-hero-icon svg {
    width: 30px;
    height: 30px;
  }

  .form-main-box {
    padding: 1.25rem;
    border-radius: 16px;
  }

  .form-section-header {
    gap: 0.75rem;
  }

  .form-section-header h2 {
    font-size: 1.05rem;
  }

  .form-main-box .form-control,
  .form-main-box .form-select {
    height: 44px;
    font-size: 0.9rem;
  }

  .trip-type-toggle {
    flex-direction: column;
  }

  .btn-form-submit {
    width: 100%;
    font-size: 1rem;
  }

  .d-flex.justify-content-end.justify-content-md-end {
    justify-content: stretch !important;
  }

  .d-flex.justify-content-end.justify-content-md-end .btn-form-submit {
    flex: 1;
  }

  /* Sidebar cards compact on mobile */
  .form-info-card,
  .form-quick-contact-item {
    padding: 1rem;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-up,
  .animate-fade-left,
  .animate-fade-right,
  .btn-form-submit {
    transition: none !important;
    animation: none !important;
  }
  
  .animate-fade-up,
  .animate-fade-left,
  .animate-fade-right {
    opacity: 1;
    transform: none;
  }
}
