/*--------------------------------------------------------------
# Registration Form Styles
--------------------------------------------------------------*/

/* Page Header */
.page-header {
    background-color: var(--primary-color);
    padding: 120px 0 60px;
    text-align: center;
    position: relative;
}

.page-header h1 {
    color: var(--light-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-header .divider {
    background-color: var(--accent-color);
}

.page-header p {
    color: rgba(255, 255, 255, 0.85);
    max-width: 700px;
    margin: 0 auto;
}

/* Form Container */
.form-container {
    background-color: var(--light-color);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 40px;
    position: relative;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.form-header p {
    color: var(--gray-color);
    max-width: 600px;
    margin: 0 auto;
}

/* Form Sections */
.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.form-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.form-section h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    position: relative;
}

.form-section h3:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent-color);
}

/* Floating Labels Style Enhancement */
.form-floating > .form-control,
.form-floating > .form-select {
    height: calc(3.5rem + 2px);
    padding: 1rem 0.75rem;
}

.form-floating > textarea.form-control {
    height: auto;
    min-height: 120px;
}

.form-floating > .form-control:focus,
.form-floating > .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(101, 0, 27, 0.25);
}

/* Basic Select Styles - Removed custom styling */
.form-select:focus {
    border-color: var(--primary-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2365001B' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-select:hover {
    border-color: rgba(101, 0, 27, 0.5);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(101, 0, 27, 0.25);
}

/* Style the dropdown options (for select elements) */
select option {
    color: var(--dark-color);
    background-color: var(--light-color);
    padding: 10px;
}

select option:hover, 
select option:focus, 
select option:active, 
select option:checked {
    background-color: rgba(101, 0, 27, 0.1) !important;
    color: var(--primary-color) !important;
}

/* Custom styling for the select element when open (not supported in all browsers) */
select:focus {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Style for select elements with value (not placeholder) */
select:not([value=""]):not(:focus) {
    color: var(--dark-color);
    font-weight: 500;
}

/* Style for floating label of select elements */
.form-floating > .form-select {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

.form-floating > .form-select ~ label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Style for select with placeholder */
.form-select option:first-child {
    color: var(--gray-color);
    font-style: italic;
}

/* Apply consistency with other form elements */
.form-floating > .form-select {
    box-shadow: none;
    border-width: 1px;
    border-style: solid;
    border-color: #ced4da;
}

/* Make sure dropdown items have proper padding */
.form-select option {
    padding: 12px;
    margin: 4px 0;
}

/* Dropdown when disabled */
.form-select:disabled {
    background-color: #e9ecef;
    opacity: 1;
    cursor: not-allowed;
}

/* Workshop Options */
.workshop-options {
    padding: 20px;
    background-color: rgba(224, 148, 51, 0.05);
    border-radius: 10px;
    margin-top: 10px;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    color: var(--gray-color);
}

.form-check-label strong {
    color: var(--primary-color);
}

.badge {
    font-size: 0.7rem;
    padding: 0.35em 0.65em;
}

/* WhatsApp Number Input Group Styling */
.whatsapp-input {
    margin-bottom: 1rem;
}

.whatsapp-input .input-group-text {
    background-color: #25D366; /* WhatsApp green color */
    border-color: #25D366;
    color: white;
    font-size: 1.2rem;
    padding: 0.6rem 1rem;
}

.whatsapp-input .input-group-text i {
    font-size: 1.3rem;
}

.country-code {
    border-radius: 0 !important;
    border-left: none;
    font-weight: 500;
}

.whatsapp-input .form-control:last-child {
    border-left: none;
}

.whatsapp-input:focus-within {
    box-shadow: 0 0 0 0.25rem rgba(37, 211, 102, 0.25);
}

/* Email confirmation field */
#email, #confirmEmail {
    position: relative;
}

#emailMatchError {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Submit Button */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

/* Success Modal */
.success-icon {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 20px;
}

.success-icon i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Modal Enhancements */
.modal-content {
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.modal-header {
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 20px 30px;
    border-bottom: none;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    border-top: none;
    padding: 15px 30px 30px;
}

/* Form Validation Styles */
.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:valid,
.form-control.is-valid {
    border-color: #198754;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-select:invalid,
.form-select.is-invalid {
    border-color: #dc3545;
    padding-right: 4.125rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-position: right 0.75rem center, center right 2.25rem;
    background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-select:valid,
.form-select.is-valid {
    border-color: #198754;
    padding-right: 4.125rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-position: right 0.75rem center, center right 2.25rem;
    background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Text Justification for Registration Page */
.form-container p, .program-desc p, .program-info-box p,
.modal-body p, .terms-modal p, .info-box p {
    text-align: justify;
    text-justify: inter-word;
}

/* Keep form headers and specific elements center-aligned */
.form-header, .form-header p, .page-header, .page-header p,
.text-center, .modal-header, .success-icon + *,
.alert, .breadcrumbs {
    text-align: center !important;
}

/* Keep form elements and labels properly aligned */
.form-label, .form-floating label, .input-group-text,
.btn, .badge, .program-meta, .program-key-info .info-item {
    text-align: initial;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .form-container {
        padding: 30px;
    }
}

@media (max-width: 767px) {
    .page-header {
        padding: 100px 0 40px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .form-container {
        padding: 25px 20px;
    }
    
    .form-section h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 575px) {
    .page-header {
        padding: 90px 0 30px;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .form-container {
        padding: 20px 15px;
    }
    
    .form-section {
        margin-bottom: 30px;
        padding-bottom: 20px;
    }
    
    .form-section h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
}
