/* TKO Apply Page Styles */

/* Visually hidden but accessible to screen readers and search engines */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Additional styles for centered form layout */
.form-container {
    min-height: calc(100vh - 300px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.form-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.form-feedback {
    margin-bottom: 16px;
    color: #ff6b6b;
    font-size: 16px;
    font-weight: 600;
}

.form-feedback.success {
    color: #AB8E41;
}

/* ===========================
   Multi-Step Form Styles
   =========================== */

/* Hide all fieldsets by default */
form#apply-form fieldset {
  display: none;
}

/* Show only the active step */
form#apply-form fieldset.active {
  display: block;
}

/* Ensure fieldsets don't have default browser styling */
form#apply-form fieldset {
  border: none;
  padding: 0;
  margin: 0 0 24px 0;
}

/* Radio group nested fieldset styling */
form#apply-form fieldset.radio-group {
  border: 1px solid #4B4B4B;
  padding: 16px;
  margin: 16px 0;
  border-radius: 4px;
}

/* Button disabled state - grey background */
form#apply-form button:disabled {
  background-color: #4B4B4B;
  color: #7D7D7D;
  border: 1px solid #7D7D7D;
  cursor: not-allowed;
  opacity: 1;
  transform: none;
  box-shadow: none;
  font-weight: 400;
}

form#apply-form button:disabled:hover {
  background-color: #4B4B4B;
  transform: none;
  box-shadow: none;
}

/* Form styling */
form#apply-form legend {
  font-family: 'Besley', serif;
  color: #AB8E41;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 24px;
  display: block;
  width: 100%;
}

form#apply-form label {
  color: #F0F0F0;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 8px;
  display: block;
  font-family: 'Open Sans', sans-serif;
}

form#apply-form input[type="text"],
form#apply-form input[type="email"],
form#apply-form input[type="tel"],
form#apply-form input[type="url"],
form#apply-form textarea,
form#apply-form select {
  background-color: #4B4B4B;
  border: 1px solid #7D7D7D;
  color: #F0F0F0;
  padding: 14px 16px;
  font-size: 16px;
  border-radius: 4px;
  font-family: 'Open Sans', sans-serif;
  transition: all 0.3s ease;
  width: 100%;
  margin-bottom: 16px;
}

form#apply-form input:focus,
form#apply-form textarea:focus,
form#apply-form select:focus {
  border-color: #AB8E41;
  outline: none;
  box-shadow: 0 0 0 2px rgba(171, 142, 65, 0.2);
}

form#apply-form input::placeholder,
form#apply-form textarea::placeholder {
  color: #A9A9A9;
}

/* Radio button styling - Button-like appearance */
form#apply-form .radio-button-label {
  display: block;
  width: 100%;
  background-color: #4B4B4B;
  border: 1px solid #7D7D7D;
  color: #F0F0F0;
  padding: 14px 16px;
  font-size: 16px;
  border-radius: 4px;
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 12px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

/* Hide the actual radio input but keep it accessible */
form#apply-form .radio-button-label input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Hover state for radio button labels */
form#apply-form .radio-button-label:hover {
  border-color: #AB8E41;
  background-color: #5A5A5A;
}

/* Checked state - gold background */
form#apply-form .radio-button-label:has(input[type="radio"]:checked) {
  background-color: #AB8E41;
  color: #1C1C1C;
  border-color: #AB8E41;
}

/* Checked state hover */
form#apply-form .radio-button-label:has(input[type="radio"]:checked):hover {
  background-color: #C9A756;
  border-color: #C9A756;
}

/* Focus state for keyboard navigation - accessible outline */
form#apply-form .radio-button-label:has(input[type="radio"]:focus-visible) {
  outline: 2px solid #AB8E41;
  outline-offset: 2px;
}

/* Active state - pressed effect */
form#apply-form .radio-button-label:active {
  transform: translateY(1px);
}

/* Contact Information Grid - Two columns on large screens */
form#apply-form .contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  margin-bottom: 24px;
}

/* Field wrapper to contain label and input */
form#apply-form .field-wrapper {
  display: flex;
  flex-direction: column;
}

/* Labels and inputs inside field-wrapper should not have bottom margin */
form#apply-form .field-wrapper label {
  margin-bottom: 8px;
}

form#apply-form .field-wrapper input {
  margin-bottom: 0;
}

/* Email and Phone fields should span full width (both columns) */
form#apply-form .field-wrapper:has(#email),
form#apply-form .field-wrapper:has(#phone) {
  grid-column: 1 / -1;
}

/* Responsive: Single column on mobile */
@media (max-width: 768px) {
  form#apply-form .contact-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  form#apply-form .field-wrapper input {
    margin-bottom: 16px;
  }
}

/* Button group container */
form#apply-form .button-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  clear: both;
  margin-top: 24px;
  width: 100%;
}

/* If only one button (Next on first step), align to the right */
form#apply-form .button-group:has(button:only-child) {
  justify-content: flex-end;
}

/* Remove right margin from buttons in flex layout */
form#apply-form .button-group button {
  margin-right: 0;
}

/* Button styling */
form#apply-form button {
  background-color: #AB8E41;
  color: #1C1C1C;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Open Sans', sans-serif;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 12px;
  margin-top: 0;
  min-height: 48px;
  min-width: 44px;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

form#apply-form button:hover:not(:disabled) {
  background-color: #C9A756;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(171, 142, 65, 0.3);
}

form#apply-form button.prev {
  background-color: transparent;
  color: #AB8E41;
  border: none;
  font-weight: 400;
  padding: 0;
  min-height: auto;
  text-decoration: none;
}

form#apply-form button.prev:hover:not(:disabled) {
  background-color: transparent;
  color: #C9A756;
  transform: none;
  box-shadow: none;
}

form#apply-form button.prev:disabled {
  background-color: transparent;
  color: #7D7D7D;
  border: none;
  font-weight: 400;
  opacity: 1;
}

/* Buttons not in button-group need top margin */
form#apply-form fieldset > button {
  margin-top: 24px;
}

/* Buttons inside button-group don't need top margin */
form#apply-form .button-group button {
  margin-top: 0;
}

/* Thank you page */
.thank-you-content {
  text-align: center;
  padding: 60px 20px;
}

.thank-you-content h1 {
  font-family: 'Besley', serif;
  color: #AB8E41;
  font-size: 42px;
  margin-bottom: 24px;
}

.thank-you-content p {
  font-size: 18px;
  color: #F0F0F0;
  margin-bottom: 16px;
  line-height: 1.6;
}

.thank-you-content a.button {
  display: inline-block;
  background-color: #AB8E41;
  color: #1C1C1C;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
  margin-top: 24px;
}

.thank-you-content a.button:hover {
  background-color: #C9A756;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(171, 142, 65, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  /* Stack buttons vertically on mobile */
  form#apply-form .button-group {
    flex-direction: column-reverse;
    gap: 12px;
  }

  form#apply-form .button-group button {
    width: 100%;
    margin-bottom: 0;
  }

  /* Single button should still be full width on mobile */
  form#apply-form .button-group:has(button:only-child) {
    justify-content: stretch;
  }

  form#apply-form legend {
    font-size: 20px;
  }

  .thank-you-content h1 {
    font-size: 32px;
  }
}
