/* Import shared color variables from CabinSaver */
@import url("https://cabinsaver.com/shared/colors.css");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, sans-serif;
  line-height: 1.4;
  color: #2c3e50;
  background: linear-gradient(
    135deg,
    var(--color-dark-blue) 0%,
    var(--color-light-blue) 100%
  );
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
}

.container {
  width: 100%;
  max-width: 1000px;
}

.header {
  text-align: center;
  margin-bottom: 20px;
  color: white;
}

.header h1 {
  font-size: 2.2em;
  margin-bottom: 8px;
  font-weight: 700;
}

.header p {
  font-size: 1.1em;
  opacity: 0.95;
}

.form-container {
  background: rgba(255, 255, 255, 0.98);
  padding: 25px 35px;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  /* simple fade-in for the form (no JS required) */
  opacity: 0;
  transform: translateY(6px);
  animation: fadeInForm 420ms cubic-bezier(0.2, 0.8, 0.2, 1) 120ms forwards;
}
@keyframes fadeInForm {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* optional: slightly pop the submit button for emphasis */
.submit-btn {
  transform: translateY(6px);
  opacity: 0;
  animation: fadeInButton 420ms cubic-bezier(0.2, 0.8, 0.2, 1) 260ms forwards;
}

@keyframes fadeInButton {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.success-message {
  display: none;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
}

.success-message.show {
  display: block;
}

.form-group {
  user-select: none;
  display: flex;
  flex-direction: column;
  margin: 10px;
}

/* Center checkbox-only form groups vertically */
.form-group:has(> label > input[type="checkbox"]) {
  justify-content: center;
}

/* Toggle switch styles */
.toggle-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.toggle-label {
  display: flex;
  align-items: center;
  cursor: default;
  margin-bottom: 5px;
}

.toggle-text {
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.9em;
}

.toggle-description {
  font-size: 0.75em;
  color: #6b7280;
  line-height: 1.3;
}

.alerts-disabled-warning {
  font-size: 0.75em;
  color: #dc2626;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 4px;
}

.toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
  margin: auto 0 0 10px;
}

.toggle-switch input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 28px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--color-light-blue);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.toggle-switch:hover .toggle-slider {
  background-color: #94a3b8;
}

.toggle-switch input:checked:hover + .toggle-slider {
  background-color: var(--color-mid-blue);
}

label {
  margin-bottom: 8px;
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.9em;
}

input[type="email"],
input[type="number"] {
  width: 100%;
  padding: 12px;
  border: 2px solid #e1e8ed;
  border-radius: 6px;
  font-size: 15px;
  transition: all 0.2s ease;
  font-family: inherit;
}

input:focus {
  outline: none;
  border-color: var(--color-light-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

input:hover:not(:focus) {
  border-color: #cbd5e1;
}

select {
  width: 100%;
  padding: 12px;
  border: 2px solid #e1e8ed;
  border-radius: 6px;
  font-size: 15px;
  background-color: white;
  cursor: pointer;
  transition: border-color 0.2s;
  font-family: inherit;
}

select:hover {
  border-color: #3b82f6;
}

select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.price-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.range-wrap {
  flex: 1;
}
.price-value {
  min-width: 48px;
  text-align: center;
  font-weight: 700;
  color: var(--color-mid-blue);
}

input[type="range"] {
  width: 100%;
  height: 6px;
  background: #e1e8ed;
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

input[type="range"]:hover {
  opacity: 0.9;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--color-light-blue);
  cursor: pointer;
  border-radius: 50%;
  margin-top: -7px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(59, 130, 246, 0.3);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--color-light-blue);
  cursor: pointer;
  border-radius: 50%;
  border: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(59, 130, 246, 0.3);
}

input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  background: #e1e8ed;
  border-radius: 3px;
}

input[type="range"]::-moz-range-track {
  width: 100%;
  height: 6px;
  background: #e1e8ed;
  border-radius: 3px;
}

.multiselect-container {
  position: relative;
}

.multiselect-input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e1e8ed;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  background: white;
  font-family: inherit;
  transition: all 0.2s ease;
}

.multiselect-input:hover {
  border-color: #cbd5e1;
}

.multiselect-input:focus {
  outline: none;
  border-color: var(--color-light-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* visual hint: down arrow inside the multiselect */
.multiselect-container::after {
  content: "\25BE"; /* ▾ */
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #6b7280;
  font-size: 20px;
  opacity: 0.9;
}

/* highlight arrow when the control is focused */
.multiselect-container:focus-within::after {
  color: var(--color-light-blue);
  transform: translateY(-50%) scale(1.1);
}

.multiselect-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid var(--color-light-blue);
  border-top: none;
  border-radius: 0 0 6px 6px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.multiselect-dropdown.show {
  display: block;
}

.multiselect-option {
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #2c3e50;
}

.multiselect-option:hover {
  background: #f8f9fa;
}

.multiselect-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.submit-btn {
  user-select: none;
  width: 100%;
  padding: 14px;
  background: var(--color-dark-blue);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1.05em;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: linear-gradient(135deg, #94a3b8 0%, #cbd5e1 100%);
  transform: none;
  box-shadow: none;
}

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

.microcopy {
  margin-top: 10px;
  font-size: 0.75em;
  color: #6b7280;
  text-align: center;
}

@media (max-width: 900px) {
  body {
    padding: 10px;
  }

  .header {
    margin-bottom: 15px;
  }

  .header h1 {
    font-size: 1.6em;
  }

  .header p {
    font-size: 1em;
  }

  .form-container {
    padding: 20px;
  }

  .price-row {
    padding-top: 0px;
  }
}

@media (max-width: 480px) {
  .form-container {
    padding: 15px;
  }

  .header h1 {
    font-size: 22px;
  }

  .header p {
    font-size: 14px;
  }

  .submit-btn {
    padding: 14px 20px;
    font-size: 16px;
  }
}
