
/* Ensure select labels are NOT floating */
.form-field.select-field .select-label {
    position: static !important;
    margin-bottom: 0.5rem !important;
    top: auto !important;
    left: auto !important;
    padding: 0 !important;
    color: #333 !important;
    font-weight: 600 !important;
}

/* Ensure consistent select height across browsers */
.form-field.select-field select {
    min-height: 44px; /* Meets touch target & Safari rendering needs */
    padding: 0.75rem 12px !important;
    line-height: 1.4; /* Helps vertical centering */
}


/* Date of Birth field: label above input */
#ar-trial-form .form-field.dob-field {
    display: flex;
    flex-direction: column;
    gap: 4px; /* space between label and input */
}

#ar-trial-form .form-field.dob-field label {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

#ar-trial-form .form-field.dob-field input[type="date"] {
    padding: 10px 12px;
    font-size: 16px; /* prevents iOS zoom */
    border: 1px solid #ddd;
    border-radius: 6px;
    height: 44px; /* large enough for touch targets */
    box-sizing: border-box;
    width: 100%;
}

#ar-trial-form .dob-field .error-message {
    margin-top: 6px;
    min-height: 18px;
    font-size: 14px;
    color: #d93025;
}
/* Override floating label styles for Date of Birth field */
#ar-trial-form .form-field.dob-field label {
    position: static !important;  /* stop absolute positioning */
    margin-bottom: 4px;           /* spacing between label and input */
    top: auto !important;
    left: auto !important;
    font-size: 15px;
    color: #333;
}

#ar-trial-form .form-field.dob-field input[type="date"] {
    padding-top: 10px !important; /* normal padding */
    padding-bottom: 10px !important;
}

.ar-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: ar-spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes ar-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.link-button {
    background: none;
    border: none;
    color: #1a73e8;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    padding: 0;
    margin: 0;
}
.link-button:hover {
    color: #0056b3;
    background-color: #f2eff511;
}


option[data-location-name]
{
    background-color: #f2eff511;
    color:rgba(0, 0, 0, 0.808)
}

option[data-location-name="Central"] {
  color:rgb(0, 0, 0)
}

option[data-location-name="Other Location"] {
    background-color: red;
    color:white;
}



#class-location-info
{
    display: none;
    margin-top: 10px;
    padding: 12px;
    border-radius: 6px;
    background-color: #f8f9fa;
    border-left: 4px solid #401c61;
    font-size: 14px;
}

#view-map-btn{
    margin-left: 10px;
     padding: 6px 10px;
      font-size: 13px;
       background-color: #401c61;
        color: white;
         border: none;
          border-radius: 4px;
           cursor: pointer;
           align-self: center;

}

#location-address{
    font-size: smaller;
}


#ar-webform-container {
    max-width: 768px;
    margin: 2rem auto;
    padding: 1.5rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#ar-webform-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.5rem;
}

.form-section {
    border: 1px solid #4e2c53;
    border-radius: 8px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    background-color: #33bead0f;
}

.form-section legend {
     font-size: 1.1em;
    padding: 0 0.5em;
    background: #4f3d79;
    border-radius: 8px;
    color: white;
}

/* Two-column grid on desktop */
.form-grid {
    display: grid;
    gap: 1.5rem;
}

.ar-success-panel {
    position: relative;
  padding: 24px;
  border: 1px solid #d4edda;
  background: #f8fff8;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ar-success-panel h3 {
  margin: 0 0 16px 0;
  color: #2e7d32;
  font-size: 1.3rem;
  font-weight: 600;
}

.ar-success-panel p {
  margin: 8px 0;
  color: #333;
  line-height: 1.5;
}

.ar-success-panel strong {
  color: #1b5e20;
}

#ar-success-actions {
margin-top: 24px;
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    flex-direction: column;
    align-content: flex-start;
    align-items: flex-start;
}

#ar-success-actions .ar-btn{
    min-width: 180px;
}

.ar-btn {
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ar-btn-book-another {
  background: #401c61;
  color: white;
}

.ar-btn-book-another:hover {
  background: #4b2370;
  transform: translateY(-1px);
}

.ar-btn-done {
 position: absolute;
 right: 10px;
 top:0px;
 margin: 10px;
}

.ar-btn-done:hover {
  background: #5a626821;
  transform: translateY(-1px);
}

.ar-btn svg {
  width: 16px;
  height: 16px;
}
.ar-success-panel,
#ar-form-section form {
  opacity: 1;
  transition: opacity 0.3s ease;
}

#ar-form-section[hidden],
#ar-success-section[hidden] {
  opacity: 0;
  display: block !important;
  pointer-events: none;
}

/* One column on mobile, two on desktop */
@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Form Field with Floating Label */
.form-field {
    position: relative;
    margin-bottom: 1.2rem;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding-top: 2.5rem ;
    padding-bottom: 0.5rem ;
    padding-left: 12px ;
    padding-right: 12px ;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    background: white;
}
input[type="checkbox"]{
    width: unset;
    margin:0px 5px 0px 5px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #401c61;
    box-shadow: 0 0 0 3px rgba(64, 28, 97, 0.1);
}

/* Floating-style label inside input */
.form-field:not(.static-label) label {
    position: absolute;
    left: 12px;
    top: 12px;
    font-size: 1rem;
    color: #777;
    pointer-events: none;
    transition: 0.2s ease all;
    padding: 0 4px;
}


::placeholder{
    font-size: smaller;
      color: #aaa;
    font-style: italic;
}
/* Shrink label when input is focused OR has value */
.form-field input:focus + label,
.form-field textarea:focus + label,
.form-field input:not(:placeholder-shown) + label,
.form-field textarea:not(:placeholder-shown) + label {
    top: 0 !important;
    font-size: 0.85rem !important;
    color: #401c61 !important;
}

/* For dropdowns: label above, not floating */
.select-field {
    position: relative;
    margin-bottom: 1.2rem;
}

.select-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

#ar-class-dropdown {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    background: white;
    box-sizing: border-box;
     white-space: pre-wrap !important;
    
}

#ar-class-dropdown.loading {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4l2 2'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    opacity: 0.8;
}

/* Error styles */
.form-field input.error,
.form-field select.error {
    border-color: #d73a49;
    background-color: #fff2f2;
}

.error-message {
    font-size: 0.85rem;
    color: #d73a49;
    margin-top: 0.25rem;
    min-height: 1.2em;
}


/* Textarea */
textarea {
    resize: vertical;
}

/* Submit button */
.form-actions {
    text-align: center;
    margin-top: 1.5rem;
}

#ar-submit-btn, .ar-btn {
    background-color: #401c61;
    color: white;
    border: none;
    padding: 12px 32px;
    font-size: 1.1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 500;
}
.ar-bt:hover{
    background-color: #2e1149;
}
#ar-submit-btn:hover:not(:disabled) {
    background-color: #5a2887;
}

#ar-submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#ar-form-messages {
    margin-top: 1rem;
    text-align: center;
}
/* === Booking Type Radio Group Styling === */
#ar-adult-trial-form .form-field input[type="radio"] {
    width: auto;
    margin: 0 8px 0 0;
    vertical-align: top;
}

#ar-adult-trial-form .form-field:not(.static-label) > label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: normal;
    color: #333;
    margin-bottom: 12px;
    cursor: pointer;
    line-height: 1.4;
}

.form-field.static-label label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Prevent floating label behavior on radio group labels */
#ar-adult-trial-form .form-field:not(.dob-field):not(.select-field) label {
    position: static !important;
    top: auto !important;
    left: auto !important;
    padding: 0 !important;
    transform: none !important;
    font-size: 1rem !important;
    color: #333 !important;
    margin: 0 !important;
    background: none !important;
}

/* Ensure error message appears below radio group */
#ar-adult-trial-form .form-field .error-message {
    margin-top: 8px;
    min-height: 1.2em;
}


/* === Booking Type as Cards === */
/* === Booking Type as Cards — Simplified & Clearer === */
.booking-type-selector legend {
  margin-bottom: 16px;
}

.booking-option {
  position: relative;
  margin-bottom: 12px;
}

.booking-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 2;
  cursor: pointer;
}

.booking-option label {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 1px;
}

/* Unselected state: neutral */
.booking-option label h3,
.booking-option label p {
  margin: 0;
  text-align: left;
}
.booking-option label h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
}
.booking-option label p {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.4;
  flex: 1;
  text-align: center;
}

.option-price {
  background: #f1f1f1;
  color: #555;
  margin-top: 1em;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  min-width: 70px;
  text-align: center;
  font-size: 0.9rem;
}

/* SELECTED STATE: strong visual dominance */
.booking-option input[type="radio"]:checked + label {
  border-color: #401c61;
  background: #f9f5fd;
  box-shadow: 0 2px 6px rgba(64, 28, 97, 0.15);
}

.booking-option input[type="radio"]:checked + label .option-price {
  background: #401c61;
  color: white;
}

.booking-option input[type="radio"]:checked + label h3 {
  color: #401c61;
}



/* Default: mobile = stacked */
.booking-type-selector {
  display: flex;
  flex-direction: column;
  gap: 12px;
  
}
.ar-section-info{
      width: 100%;
    margin-top: -1em;
    padding-left: 0.5em;
}

/* Desktop: side-by-side cards */
@media (min-width: 768px) {
  .booking-type-selector {
    flex-direction: row;
    gap: 24px; /* more space between cards on desktop */
    flex-wrap: wrap;
  }

  .booking-option {
    flex: 1;
    min-width: 0; /* prevents overflow */
  }

  .booking-option label {
    height: 100%; /* stretch to match sibling */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1px;
  }

  .booking-option label h3 {
    margin-top: 4px;
  }

  .booking-option label p {
    flex: 1;
    margin: 8px 0;
    text-align: center;
  }

  .option-price {
    align-self: flex-end;
    margin-top: auto;
  }
}


/* Mobile-first: full width until tablet+ */
@media (max-width: 767px) {
    #ar-webform-container {
        margin: 1rem;
        padding: 1rem;
    }
}