/**
 * Shared Contact Form Styles
 * Common CSS for enhanced contact forms across the site
 */

/* Enhanced Form Styling */
#landingContactForm .form-label {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    display: block;
}

#landingContactForm .form-label .text-danger {
    font-weight: 700;
    font-size: 16px;
}

#landingContactForm .form-control:focus {
    border-color: #1F5A8A !important;
    box-shadow: 0 0 0 0.2rem rgba(31, 90, 138, 0.15) !important;
    transform: translateY(-1px);
}

#landingContactForm .form-control:hover {
    border-color: #1F5A8A !important;
    transform: translateY(-1px);
}

#landingContactForm .form-control.is-valid {
    border-color: #28a745 !important;
    background-image: none;
}

#landingContactForm .form-control.is-invalid {
    border-color: #dc3545 !important;
    background-image: none;
}

#landingContactForm .invalid-feedback {
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
}

#landingContactForm .form-control::placeholder {
    color: #a0aec0;
    font-style: italic;
}

/* Multi-select dropdown styling */
.form-control[multiple] {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 16px 20px;
    background-color: white;
    transition: all 0.3s ease;
    min-height: 120px;
}

.form-control[multiple]:hover {
    border-color: #1F5A8A !important;
    transform: translateY(-1px);
}

.form-control[multiple]:focus {
    border-color: #1F5A8A !important;
    box-shadow: 0 0 0 0.2rem rgba(31, 90, 138, 0.15) !important;
    transform: translateY(-1px);
}

.form-control[multiple] option {
    padding: 8px 12px;
    font-size: 15px;
    color: #2d3748;
    font-weight: 500;
}

.form-control[multiple] option:checked {
    background-color: #1F5A8A;
    color: white;
}

/* Submit button styling */
#landing-submit-btn {
    background: linear-gradient(135deg, #1F5A8A 0%, #164a73 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 16px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(31, 90, 138, 0.3) !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    height: 56px !important;
}

#landing-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(31, 90, 138, 0.4) !important;
    background: linear-gradient(135deg, #2563a8 0%, #1a5282 100%) !important;
}

#landing-submit-btn:active {
    transform: translateY(0);
}

#landing-submit-btn:disabled {
    opacity: 0.8;
    transform: none !important;
    box-shadow: 0 4px 15px rgba(31, 90, 138, 0.2) !important;
}

/* Form container styling */
.contact-form-container {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(31, 90, 138, 0.1);
}

/* Text visibility fix */
.contact-cta-text {
    background: rgba(0, 0, 0, 0.4);
    padding: 12px 20px;
    border-radius: 12px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #landingContactForm .form-control {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
    
    .contact-form-container {
        margin-top: 2rem;
    }
    
    #landingContactForm .form-label {
        font-size: 15px;
    }
}

/* Animation for form appearance */
.contact-form-container {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced field spacing */
#landingContactForm .mb-4 {
    margin-bottom: 1.75rem !important;
}

#landingContactForm .mb-5 {
    margin-bottom: 2.25rem !important;
}

/* Custom dropdown styling */
.custom-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-header {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 16px 20px;
    background-color: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    transition: all 0.3s ease;
    min-height: 56px;
    user-select: none;
    position: relative;
    z-index: 1;
}

.dropdown-header:hover {
    border-color: #1F5A8A;
    transform: translateY(-1px);
}

.dropdown-header.active {
    border-color: #1F5A8A;
    box-shadow: 0 0 0 0.2rem rgba(31, 90, 138, 0.15);
}

.dropdown-text {
    color: #2d3748;
    font-weight: 500;
    flex: 1;
    cursor: pointer;
    user-select: none;
}

.dropdown-text.placeholder {
    color: #6c757d;
}

.dropdown-arrow {
    color: #6c757d;
    transition: transform 0.3s ease;
    cursor: pointer;
    user-select: none;
    pointer-events: none;
}

.dropdown-header.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #1F5A8A;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    margin-top: 4px;
}

.dropdown-menu.show {
    display: block;
    animation: dropdownFadeIn 0.2s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-option {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover {
    background-color: #f8f9fa;
}

.dropdown-option.selected {
    background-color: #e3f2fd;
}

.option-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.dropdown-option.selected .option-checkbox {
    background-color: #1F5A8A;
    border-color: #1F5A8A;
}

.dropdown-option.selected .option-checkbox::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.option-text {
    color: #2d3748;
    font-size: 15px;
    font-weight: 500;
    flex: 1;
}

.dropdown-option.selected .option-text {
    color: #1F5A8A;
    font-weight: 600;
}

/* Shining text effect */
.shining-text {
    background: linear-gradient(90deg, #962fbf 0%, #d62976 25%, #feda75 50%, #d62976 75%, #962fbf 100%);
    background-size: 200% auto;
    color: #fff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shine 4s linear infinite;
}

@keyframes shine {
    from {
        background-position: 200% center;
    }
    to {
        background-position: 0% center;
    }
}

/* Custom Multi-select Dropdown */
.custom-multiselect-container {
    position: relative;
    width: 100%;
}

.multiselect-header {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 16px 20px;
    background-color: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    transition: all 0.3s ease;
    min-height: 56px;
    user-select: none;
    color: #6c757d; /* Placeholder color */
}

.multiselect-header.items-selected {
    color: #2d3748; /* Text color when items are selected */
    font-weight: 500;
}

.multiselect-header:hover {
    border-color: #1F5A8A;
    transform: translateY(-1px);
}

.multiselect-header.active {
    border-color: #1F5A8A;
    box-shadow: 0 0 0 0.2rem rgba(31, 90, 138, 0.15);
}

.multiselect-header::after {
    content: '▼';
    font-size: 12px;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.multiselect-header.active::after {
    transform: rotate(180deg);
}

.multiselect-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #1F5A8A;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    margin-top: 4px;
    animation: dropdownFadeIn 0.2s ease-out;
}

.multiselect-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
}

.multiselect-item:last-child {
    border-bottom: none;
}

.multiselect-item:hover {
    background-color: #f8f9fa;
}

.multiselect-item.selected {
    background-color: #e3f2fd;
}

.multiselect-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.multiselect-item .multiselect-checkbox.selected {
    background-color: #1F5A8A;
    border-color: #1F5A8A;
}

.multiselect-item .multiselect-checkbox.selected::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.multiselect-item span {
    color: #2d3748;
    font-size: 15px;
    font-weight: 500;
}

.multiselect-item.selected span {
    color: #1F5A8A;
    font-weight: 600;
}