/* ======================================================
   BOOKING FORM STYLES
   Cogoport-style booking form for hero section
====================================================== */

.booking-section {
  position: relative;
  margin-top: 3rem;
}

.booking-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.booking-header {
  margin-bottom: 2rem;
}

.booking-header h3 {
  color: var(--color-primary);
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.booking-header p {
  color: var(--text-color-1);
  margin: 0;
}

.booking-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-group label .required {
  color: var(--color-main);
}

.form-control,
.form-select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 0.875rem 1rem;
  color: #ffffff !important;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: var(--font-1);
  -webkit-text-fill-color: #ffffff;
}

.form-control::-webkit-input-placeholder {
  color: rgba(244, 244, 244, 0.6);
  -webkit-text-fill-color: rgba(244, 244, 244, 0.6);
}

.form-control:-moz-placeholder {
  color: rgba(244, 244, 244, 0.6);
  opacity: 1;
}

.form-control::-moz-placeholder {
  color: rgba(244, 244, 244, 0.6);
  opacity: 1;
}

.form-control:-ms-input-placeholder {
  color: rgba(244, 244, 244, 0.6);
}

.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-main);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(249, 115, 44, 0.1);
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.form-control:active,
.form-control:focus-visible {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

input.form-control {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.form-control::placeholder {
  color: var(--text-color-1);
  opacity: 0.6;
}

.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23f4f4f4' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px 12px;
  padding-right: 2.5rem;
  appearance: none;
}

.form-select option {
  background: var(--color-bg-2);
  color: var(--color-primary);
}

/* Port Search with Autocomplete */
.port-search-container {
  position: relative;
}

.port-search-input {
  width: 100%;
  padding-left: 2.75rem;
}

.port-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-color-1);
  pointer-events: none;
}

.port-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: var(--color-bg-2);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.port-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.port-dropdown .dropdown-item {
  padding: 0.875rem 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
  border-bottom: 1px solid var(--color-border);
}

.port-dropdown .dropdown-item:last-child {
  border-bottom: none;
}

.port-dropdown .dropdown-item:hover {
  background: rgba(249, 115, 44, 0.1);
}

.port-dropdown .dropdown-item.disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.port-name {
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.port-details {
  color: var(--text-color-1);
  font-size: 0.85rem;
}

/* Form Actions */
.form-actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.btn-estimate {
  background: linear-gradient(
    135deg,
    var(--color-main) 0%,
    var(--color-darker) 100%
  );
  color: white;
  padding: 1rem 2.5rem;
  border: none;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-estimate:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(249, 115, 44, 0.4);
}

.btn-estimate:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Loading Spinner */
.loading-spinner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 22, 40, 0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.loading-spinner.show {
  display: flex;
}

.spinner-content {
  text-align: center;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(249, 115, 44, 0.2);
  border-top-color: var(--color-main);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner-text {
  color: var(--color-primary);
  font-size: 1.1rem;
}

/* Estimate Modal */
.estimate-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 22, 40, 0.95);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
}

.estimate-modal.show {
  display: flex;
}

.estimate-modal-content {
  background: var(--color-bg-2);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.estimate-modal-header {
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-modal {
  background: none;
  border: none;
  color: var(--text-color-1);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-modal:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-primary);
}

.estimate-modal-body {
  padding: 2rem;
}

.estimate-header {
  margin-bottom: 2rem;
}

.estimate-total {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 1.5rem;
  background: rgba(249, 115, 44, 0.1);
  border-radius: 12px;
  border-left: 4px solid var(--color-main);
}

.total-label {
  color: var(--text-color-1);
  font-size: 0.9rem;
}

.total-amount {
  color: var(--color-main);
  font-size: 2.5rem;
  font-weight: 700;
}

.estimate-transit {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 2rem;
  color: var(--color-primary);
}

.estimate-breakdown {
  margin-bottom: 2rem;
}

.estimate-breakdown h5 {
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--text-color-1);
}

.breakdown-item:last-child {
  border-bottom: none;
}

.estimate-notes,
.estimate-recommendations {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.estimate-notes h6,
.estimate-recommendations h6 {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.estimate-notes p,
.estimate-recommendations p {
  color: var(--text-color-1);
  margin: 0;
  line-height: 1.6;
}

.estimate-recommendations ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.estimate-recommendations li {
  color: var(--text-color-1);
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.6;
}

.estimate-recommendations li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-main);
  font-weight: bold;
  font-size: 1.1rem;
}

.estimate-recommendations li strong {
  color: var(--color-primary);
  font-weight: 600;
}

.estimate-confidence {
  margin-bottom: 2rem;
  text-align: center;
}

.confidence-badge {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
}

.confidence-high {
  background: rgba(40, 167, 69, 0.2);
  color: #28a745;
}

.confidence-medium {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

.confidence-low {
  background: rgba(220, 53, 69, 0.2);
  color: #dc3545;
}

.estimate-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  padding: 1rem 2rem;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-1);
}

.btn-outline:hover {
  border-color: var(--color-main);
  background: rgba(249, 115, 44, 0.1);
}

/* Contact Section in Estimate Modal */
.estimate-contact {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(249, 115, 44, 0.05);
  border: 1px solid rgba(249, 115, 44, 0.2);
  border-radius: 12px;
  text-align: center;
}

.contact-text {
  color: var(--text-color-1);
  margin-bottom: 1rem;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.contact-text i {
  color: var(--color-main);
  font-size: 1.2rem;
}

.contact-options {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--color-main);
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.contact-link:hover {
  background: #e66a28;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(249, 115, 44, 0.3);
}

.contact-link i {
  font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .booking-card {
    padding: 1.5rem;
  }

  .booking-form-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn-estimate {
    width: 100%;
    justify-content: center;
  }

  .estimate-actions {
    flex-direction: column;
  }

  .estimate-actions button {
    width: 100%;
  }

  .total-amount {
    font-size: 2rem;
  }
}
