/* Request Tour Modal Styles */
.react-datepicker-wrapper {
  width: 100% !important;
}

/* React Modal Override */
.ReactModal__Overlay {
  opacity: 0;
  transition: opacity 200ms ease-in-out;
}

.ReactModal__Overlay--after-open {
  opacity: 1;
}

.ReactModal__Overlay--before-close {
  opacity: 0;
}

/* Modal Content Wrapper */
.request-tour-modal-content {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Modal Header */
.request-tour-modal-content .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 32px;
  border-bottom: 1px solid #e5e7eb;
}

.request-tour-modal-content .modal-header h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  color: #1f2937;
}

.request-tour-modal-content .close-btn {
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #6b7280;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  transition: all 0.2s;
}

.request-tour-modal-content .close-btn:hover {
  background-color: #f3f4f6;
  color: #1f2937;
}

/* Progress Bar */
.progress-bar-container {
  height: 4px;
  background-color: #e5e7eb;
  width: 100%;
}

.progress-bar {
  height: 100%;
  background: var(--primary-color2);
  transition: width 0.3s ease;
}

/* Stepper */
.stepper {
  display: flex;
  justify-content: space-between;
  padding: 30px 30px 20px;
  position: relative;
}

.stepper::before {
  content: "";
  position: absolute;
  top: 50px;
  left: 60px;
  right: 60px;
  height: 2px;
  background-color: #e5e7eb;
  z-index: 0;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  flex: 1;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #f3f4f6;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s;
  border: 2px solid #e5e7eb;
}

.step.active .step-number {
  background: var(--primary-color2);
  color: white;
  border-color: var(--primary-color2);
  box-shadow: 0 4px 12px rgba(var(--primary-color2-opc), 0.3);
}

.step.completed .step-number {
  background-color: #10b981;
  color: white;
  border-color: #10b981;
}

.step-title {
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  font-weight: 500;
}

.step.active .step-title {
  color: var(--primary-color2);
  font-weight: 600;
}

.step.completed .step-title {
  color: #10b981;
}

/* Modal Body */
.modal-body {
  padding: 32px 40px;
  min-height: 420px;
}

.step-content h3 {
  font-size: 24px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 10px;
}

.step-description {
  color: #6b7280;
  margin-bottom: 28px;
  font-size: 15px;
  line-height: 1.6;
}

/* Form Groups */
.form-group {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: #374151;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.4;
}

.form-group .required {
  color: #ef4444;
  margin-left: 4px;
}

.form-control {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 14.5px;
  transition: all 0.2s;
  font-family: inherit;
  line-height: 1.5;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color2);
  box-shadow: 0 0 0 4px rgba(var(--primary-color2-opc), 0.1);
}

.form-control::placeholder {
  color: #9ca3af;
}

.form-control.is-invalid {
  border-color: #ef4444;
}

.form-control.is-invalid:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.error-message {
  color: #ef4444;
  font-size: 13px;
  margin-top: 6px;
  display: block;
  font-weight: 500;
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

select.form-control {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 20px;
  padding-right: 40px;
  appearance: none;
}

.text-muted {
  color: #6b7280;
  font-size: 13px;
}

.form-text {
  display: block;
  margin-top: 6px;
}

/* Guest Counter */
.guest-counter-wrapper {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 16px;
}

.guest-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.guest-item:not(:last-child) {
  border-bottom: 1px solid #e5e7eb;
}

.guest-info {
  display: flex;
  flex-direction: column;
}

.guest-label {
  font-weight: 500;
  color: #1f2937;
  font-size: 14px;
}

.guest-age {
  color: #6b7280;
  font-size: 12px;
  margin-top: 2px;
}

.quantity-counter {
  display: flex;
  align-items: center;
  gap: 12px;
}

.counter-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #d1d5db;
  background-color: white;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 16px;
  color: #374151;
}

.counter-btn:hover:not(:disabled) {
  background-color: #f3f4f6;
  border-color: #9ca3af;
}

.counter-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.counter-input {
  width: 50px;
  text-align: center;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 6px;
  font-weight: 500;
  font-size: 14px;
}

/* Activity Level Grid */
.activity-level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.activity-level-card {
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.activity-level-card:hover {
  border-color: var(--primary-color2);
  background-color: rgba(var(--primary-color2-opc), 0.05);
}

.activity-level-card.selected {
  border-color: var(--primary-color2);
  background-color: rgba(var(--primary-color2-opc), 0.1);
  box-shadow: 0 0 0 3px rgba(var(--primary-color2-opc), 0.1);
}

.activity-level-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.activity-level-card h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

.activity-level-card p {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
}

.activity-level-card input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Interests Grid */
.interests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.interest-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.interest-checkbox:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
}

.interest-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.interest-checkbox input[type="checkbox"]:checked ~ .interest-label {
  font-weight: 600;
  color: var(--primary-color2);
}

.interest-label {
  font-size: 14px;
  color: #374151;
  user-select: none;
}

/* Accommodation Grid */
.accommodation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.accommodation-card {
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.accommodation-card:hover {
  border-color: var(--primary-color2);
  background-color: rgba(var(--primary-color2-opc), 0.05);
}

.accommodation-card.selected {
  border-color: var(--primary-color2);
  background-color: rgba(var(--primary-color2-opc), 0.1);
  box-shadow: 0 0 0 3px rgba(var(--primary-color2-opc), 0.1);
}

.accommodation-card input[type="radio"] {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.accommodation-icon {
  font-size: 32px;
  color: var(--primary-color2);
  margin-bottom: 8px;
}

.accommodation-card h4 {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin: 8px 0 4px;
}

.accommodation-card p {
  font-size: 12px;
  color: #6b7280;
  margin: 0;
}

/* Budget Grid */
.budget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.budget-card {
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.budget-card:hover {
  border-color: var(--primary-color2);
  background-color: rgba(var(--primary-color2-opc), 0.05);
}

.budget-card.selected {
  border-color: var(--primary-color2);
  background-color: rgba(var(--primary-color2-opc), 0.1);
  box-shadow: 0 0 0 3px rgba(var(--primary-color2-opc), 0.1);
}

.budget-card input[type="radio"] {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.budget-card h4 {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 6px;
}

.budget-card p {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
}

/* Info Box */
.info-box {
  background-color: rgba(var(--primary-color2-opc), 0.1);
  border-left: 4px solid var(--primary-color2);
  border-radius: 6px;
  padding: 16px;
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.info-box i {
  color: var(--primary-color2);
  font-size: 20px;
  flex-shrink: 0;
}

.info-box p {
  margin: 0;
  color: var(--primary-color2);
  font-size: 13px;
  line-height: 1.5;
}

/* Summary Box */
.summary-box {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.summary-box h4 {
  font-size: 16px;
  font-weight: 600;
  color: #166534;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-box ul {
  margin: 0;
  padding-left: 20px;
}

.summary-box li {
  color: #15803d;
  font-size: 14px;
  line-height: 1.8;
}

/* Consent Checkbox */
.consent-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.consent-checkbox label {
  display: flex;
  gap: 10px;
  cursor: pointer;
  margin: 0;
}

.consent-checkbox input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.consent-checkbox span {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.5;
}

/* Modal Footer */
.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-top: 1px solid #e5e7eb;
  background-color: #f9fafb;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.step-indicator {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.btn-primary,
.btn-secondary {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--primary-color2);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-color2);
  opacity: 0.9;
  box-shadow: 0 4px 12px rgba(var(--primary-color2-opc), 0.3);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: white;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #f3f4f6;
  border-color: #9ca3af;
}

.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-primary:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Spinner for loading state */
.spinner-border {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  vertical-align: text-bottom;
  border: 0.2em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border 0.75s linear infinite;
}

.spinner-border-sm {
  width: 0.875rem;
  height: 0.875rem;
  border-width: 0.15em;
}

@keyframes spinner-border {
  to {
    transform: rotate(360deg);
  }
}

/* Request Tour Button (Standalone) */
.request-tour-btn {
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.request-tour-btn.btn-primary {
  background: var(--primary-color1);
  color: white;
}

.request-tour-btn.btn-primary:hover {
  background: var(--primary-color1);
  opacity: 0.9;
  box-shadow: 0 6px 16px rgba(var(--primary-color1-opc), 0.3);
  transform: translateY(-2px);
}

.request-tour-btn.btn-secondary {
  background-color: var(--primary-color2);
  color: white;
}

.request-tour-btn.btn-secondary:hover {
  background-color: var(--primary-color2);
  box-shadow: 0 6px 16px rgba(var(--primary-color2-opc), 0.3);
  transform: translateY(-2px);
}

.request-tour-btn.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-color2);
  color: var(--primary-color2);
}

.request-tour-btn.btn-outline:hover {
  background-color: var(--primary-color2);
  color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
  .request-tour-modal {
    margin: 10px;
    max-height: 95vh;
  }

  .stepper {
    padding: 20px 15px 15px;
    overflow-x: auto;
  }

  .stepper::before {
    left: 40px;
    right: 40px;
  }

  .step-title {
    font-size: 10px;
  }

  .step-number {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-header {
    padding: 20px;
  }

  .modal-footer {
    padding: 15px 20px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .step-indicator {
    width: 100%;
    text-align: center;
    order: -1;
  }

  .activity-level-grid,
  .accommodation-grid,
  .budget-grid {
    grid-template-columns: 1fr;
  }

  .interests-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

@media (max-width: 480px) {
  .request-tour-modal .modal-header h2 {
    font-size: 20px;
  }

  .step-content h3 {
    font-size: 18px;
  }

  .interests-grid {
    grid-template-columns: 1fr;
  }
}
