/**
 * Booking Form Styles
 * Uses luxury color palette with BEM methodology
 */

/* Form Wrapper */
.vl-form-wrapper--hero,
.vl-form-wrapper--contact,
.vl-form-wrapper--footer,
.vl-form-wrapper--sidebar {
  width: 100%;
}

/* Base Form Styles */
.vl-booking-form {
  background-color: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  backdrop-filter: none;
}

.vl-booking-form--hero {
  max-width: 100%;
}

.vl-booking-form--contact {
  max-width: 800px;
  margin: 0 auto;
}

.vl-booking-form--footer {
  background-color: rgba(13, 13, 13, 0.95);
  border-color: rgba(201, 169, 98, 0.3);
  padding: 24px;
}

.vl-booking-form--sidebar {
  position: sticky;
  top: 120px;
}

/* Form Fields Container */
.vl-form-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 24px;
}

/* Layout: Grid */
.vl-form-layout--grid .vl-form-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 768px) {
  .vl-form-layout--grid .vl-form-fields {
    grid-template-columns: repeat(2, 1fr);
  }

  .vl-form-layout--grid .vl-form-field--textarea,
  .vl-form-layout--grid .vl-form-field--checkbox {
    grid-column: 1 / -1;
  }
}

/* Layout: Inline */
.vl-form-layout--inline .vl-form-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

/* Individual Form Field */
.vl-form-field {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Labels */
.vl-form-label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-gray-400);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

.vl-required {
  color: var(--color-gold);
  font-size: 14px;
}

/* Input Fields */
.vl-form-input,
.vl-form-textarea,
.vl-form-select {
  width: 100%;
  padding: 16px 18px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(201, 169, 98, 0.15);
  border-radius: 4px;
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 15px;
  transition: all 0.35s ease;
}

.vl-form-input:focus,
.vl-form-textarea:focus,
.vl-form-select:focus {
  outline: none;
  border-color: var(--color-gold);
  background-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(201, 169, 98, 0.08);
  transform: translateY(-1px);
}

.vl-form-input::placeholder,
.vl-form-textarea::placeholder {
  color: rgba(248, 247, 244, 0.35);
  font-size: 14px;
  font-style: italic;
}

/* Textarea */
.vl-form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

/* Select */
.vl-form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23C9A962' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 48px;
  cursor: pointer;
}

.vl-form-select option {
  background-color: var(--color-dark);
  color: var(--color-white);
  padding: 8px;
}

/* Checkbox */
.vl-form-checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
}

.vl-form-checkbox {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--color-gold);
  border-radius: 2px;
  background-color: transparent;
  cursor: pointer;
  appearance: none;
  position: relative;
  transition: all 0.3s ease;
  margin-top: 2px;
}

.vl-form-checkbox:checked {
  background-color: var(--color-gold);
  border-color: var(--color-gold);
}

.vl-form-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid var(--color-dark);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.vl-form-checkbox:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.2);
}

.vl-form-checkbox-label {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-cream);
  line-height: 1.5;
  cursor: pointer;
  flex: 1;
}

.vl-form-checkbox-label a {
  color: var(--color-gold);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.vl-form-checkbox-label a:hover {
  color: var(--color-gold-light);
}

/* Field Errors */
.vl-field-error {
  font-size: 12px;
  color: #ff4444;
  margin-top: 4px;
  font-family: var(--font-body);
}

.vl-form-field.has-error .vl-form-input,
.vl-form-field.has-error .vl-form-textarea,
.vl-form-field.has-error .vl-form-select {
  border-color: #ff4444;
}

/* Form Messages */
.vl-form-messages {
  margin-bottom: 20px;
}

.vl-form-message {
  padding: 14px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-family: var(--font-body);
  line-height: 1.5;
}

.vl-form-message--success {
  background-color: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.3);
  color: #2ecc71;
}

.vl-form-message--error {
  background-color: rgba(255, 68, 68, 0.1);
  border: 1px solid rgba(255, 68, 68, 0.3);
  color: #ff4444;
}

/* Submit Button */
.vl-form-submit {
  margin-top: 16px;
}

.vl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  border: 2px solid transparent;
  border-radius: 5px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  position: relative;
}

.vl-btn-primary {
  background-color: var(--color-gold);
  color: var(--color-dark);
  border: 2px solid var(--color-gold);
  width: 100%;
}

.vl-btn-primary:hover {
  background-color: var(--color-gold-light);
  border-color: var(--color-gold-light);
  transform: translateY(-2px);
}

.vl-btn-primary:active {
  background-color: var(--color-gold-dark);
  border-color: var(--color-gold-dark);
  transform: translateY(0);
}

.vl-btn-primary:disabled {
  background: rgba(201, 169, 98, 0.3);
  border-color: transparent;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.vl-btn-submit {
  position: relative;
}

.vl-btn-submit.is-submitting .vl-btn-text {
  opacity: 0;
}

.vl-btn-submit.is-submitting .vl-btn-text-submitting,
.vl-btn-submit.is-submitting .vl-btn-loader {
  display: inline-block !important;
}

.vl-btn-loader {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-dark);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .vl-booking-form {
    padding: 24px;
  }

  .vl-booking-form--hero {
    max-width: 100%;
  }

  .vl-form-input,
  .vl-form-textarea,
  .vl-form-select {
    padding: 12px 14px;
    font-size: 16px; /* Prevent zoom on iOS */
  }

  .vl-btn {
    padding: 14px 24px;
  }
}

@media (max-width: 480px) {
  .vl-booking-form {
    padding: 20px;
  }

  .vl-form-label {
    font-size: 13px;
  }

  .vl-btn {
    padding: 12px 20px;
    font-size: 14px;
  }
}
