/**
 * Multi-Sports Registration Form Styles
 * Custom styling for the registration form
 */

/* Main form container */
.amti-registration-form {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.amti-registration-form .card {
    border: 1px solid #dee2e6;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.amti-registration-form .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.25rem;
}

.amti-registration-form .card-title {
    color: #495057;
    font-weight: 600;
    font-size: 1.5rem;
}

/* Section styling */
.section-title {
    color: #495057;
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.section-title + hr {
    border-top: 2px solid #007bff;
    width: 100px;
    margin-left: 0;
    margin-bottom: 1.5rem;
}

/* Form field styling */
.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

fieldset {
    border: none;
    padding: 0;
    margin: 0;
    min-width: 0;
}

legend {
    font-size: 1rem;
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
    padding: 0;
    border: none;
    width: auto;
    max-width: none;
}

.form-control:focus,
.form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Invalid radio button and checkbox styling */
.form-check-input.is-invalid {
    border-color: #dc3545;
}

.form-check-input.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.has-error {
    border-left: 3px solid #dc3545;
    padding-left: 10px;
    margin-left: -10px;
}

/* Required field indicator */
.text-danger {
    color: #dc3545 !important;
}

/* Radio button and checkbox styling */
.form-check {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    margin-left: -1.5rem;
    border: 2px solid #6c757d;
    background-color: #fff;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: #007bff;
    border-color: #007bff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
}

.form-check-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

.form-check-input[type="radio"] {
    border-radius: 50%;
}

.form-check-label {
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    padding-left: 0.5rem;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Hover effects for better UX */
.form-check:hover .form-check-input {
    border-color: #007bff;
}

.form-check:hover .form-check-label {
    color: #007bff;
}

/* Enhanced radio button visibility */
.form-check-input[type="radio"]:checked {
    background-color: #007bff;
    border-color: #007bff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
}

.form-check-input[type="radio"]:checked:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Better spacing for radio button groups */
fieldset .form-check:last-child {
    margin-bottom: 0;
}

/* Ensure radio buttons are aligned properly */
.form-check-input[type="radio"] {
    vertical-align: top;
    margin-top: 0.25rem;
}

/* Enhanced contrast for better visibility */
@media (prefers-contrast: high) {
    .form-check-input {
        border-width: 3px;
    }
    
    .form-check-input:checked {
        background-color: #000000;
        border-color: #000000;
    }
}

/* Signature field styling */
.signature-field {
    font-family: "Brush Script MT", cursive, "Lucida Handwriting", serif;
    font-size: 1.2rem;
    font-style: italic;
    background-color: #f8f9fa;
    border: 2px dashed #6c757d;
}

.signature-field:focus {
    background-color: #ffffff;
    border-style: solid;
}

/* Waiver section styling */
.waiver-sections .card {
    margin-bottom: 1rem;
}

.waiver-sections .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.75rem;
}

.waiver-sections .card-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #6c757d;
}

.waiver-initial {
    max-width: 100px;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
}

/* Alert styling */
.alert {
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: #d1edff;
    border-color: #bee5eb;
    color: #0c5460;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-heading {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.alert ul {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

/* Button styling */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    padding: 0.75rem 2rem;
    font-weight: 500;
    font-size: 1.1rem;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #004085;
    transform: translateY(-1px);
    box-shadow: 0 0.125rem 0.5rem rgba(0, 123, 255, 0.3);
}

.btn-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .amti-registration-form {
        margin: 0 15px;
    }
    
    .amti-registration-form .card-body {
        padding: 1rem;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .btn-primary {
        width: 100%;
        padding: 1rem;
    }
}

/* Mobility aids checkbox grid */
.mobility-aids-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

@media (max-width: 576px) {
    .mobility-aids-grid {
        grid-template-columns: 1fr;
    }
}

/* Form validation feedback */
.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

/* Loading state */
.btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Custom form text styling */
.form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Conditional field transitions */
#disability-fields,
#veteran-fields,
#assistance-field,
#parent-guardian-section {
    transition: all 0.3s ease-in-out;
}

/* Focus indicators for accessibility */
.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn:focus {
    outline: none;
}

/* Print styles */
@media print {
    .btn {
        display: none;
    }
    
    .alert {
        border: 1px solid #000;
    }
    
    .signature-field {
        border-bottom: 2px solid #000;
        background: none;
        font-family: serif;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .form-control,
    .form-select {
        border-width: 2px;
    }
    
    .section-title + hr {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .btn-primary:hover {
        transform: none;
    }
    
    #disability-fields,
    #veteran-fields,
    #assistance-field,
    #parent-guardian-section {
        transition: none;
    }
}