/**
 * Matchmaking Application Form Styles
 * Component-based CSS for the matchmaking form
 */

/* Form Control Styles */
.matchmaking-form .form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.matchmaking-form .form-control:focus {
    outline: none;
    border-color: #9333ea;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

.matchmaking-form .form-control:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Form Check Input */
.matchmaking-form .form-check-input {
    margin-top: 0.25rem;
}

/* Glass Material Cards */
.matchmaking-form .glass-form-card {
    position: relative;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
}

/* Participation Mode Selection */
.matchmaking-form .participation-mode-radio {
    margin-right: 0.5rem;
}

.matchmaking-form .participation-mode-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.matchmaking-form .participation-mode-label:hover {
    background-color: #f3f4f6;
    border-color: #9333ea;
}

.matchmaking-form .participation-mode-radio:checked + .participation-mode-label,
.matchmaking-form .participation-mode-label:has(input:checked) {
    background-color: #f3e8ff;
    border-color: #9333ea;
    font-weight: 600;
}

/* Section Headers */
.matchmaking-form .section-header {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.matchmaking-form .subsection-header {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
}

/* Field Groups */
.matchmaking-form .field-group {
    margin-bottom: 1rem;
}

.matchmaking-form .field-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.matchmaking-form .field-label .required {
    color: #ef4444;
    margin-left: 0.25rem;
}

/* Error Messages */
.matchmaking-form .error-message {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #ef4444;
}

.matchmaking-form .warning-message {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #ef4444;
    padding: 0.5rem;
    background-color: #fef2f2;
    border-radius: 0.375rem;
    border-left: 3px solid #ef4444;
}

/* Error highlight animation */
@keyframes errorHighlight {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
        transform: scale(1);
    }
}

/* Submit Button */
.matchmaking-form .submit-button {
    background-color: #9333ea;
    color: white;
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.matchmaking-form .submit-button:hover:not(:disabled) {
    background-color: #7e22ce;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.matchmaking-form .submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Checkbox and Radio Groups */
.matchmaking-form .checkbox-group,
.matchmaking-form .radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.matchmaking-form .checkbox-item,
.matchmaking-form .radio-item {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.matchmaking-form .checkbox-item input,
.matchmaking-form .radio-item input {
    margin-right: 0.5rem;
}

/* Range Inputs (Age, Height) */
.matchmaking-form .range-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.matchmaking-form .range-inputs .form-control {
    flex: 1;
}

.matchmaking-form .range-separator {
    color: #6b7280;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .matchmaking-form .glass-form-card {
        padding: 1rem;
    }
    
    .matchmaking-form .section-header {
        font-size: 1.25rem;
    }
    
    .matchmaking-form .checkbox-group,
    .matchmaking-form .radio-group {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Loading States */
.matchmaking-form .loading {
    opacity: 0.6;
    pointer-events: none;
}

.matchmaking-form .loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #9333ea;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Background gradient for form container */
.matchmaking-form {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1) 0%, rgba(244, 63, 94, 0.1) 50%, rgba(236, 72, 153, 0.05) 100%);
}

/* Section background colors */
.matchmaking-form .section-bg-private {
    background: rgba(243, 244, 246, 0.7);
}

.matchmaking-form .section-bg-public {
    background: rgba(240, 253, 244, 0.7);
}

.matchmaking-form .section-bg-required {
    background: rgba(254, 242, 242, 0.9);
}

/* Glass fade-in animation */
.glass-fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Header text - non-transparent font */
.matchmaking-form .glass-form-card h1 {
    color: #111827 !important; /* Very dark gray, fully opaque */
    opacity: 1 !important;
    -webkit-text-fill-color: #111827 !important;
    font-weight: 800 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.matchmaking-form .glass-form-card p {
    color: #374151 !important; /* Dark gray, fully opaque */
    opacity: 1 !important;
    -webkit-text-fill-color: #374151 !important;
    font-weight: 700 !important;
}

/* Ensure header background is solid for better text contrast */
.matchmaking-form .glass-form-card:has(h1) {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15) !important;
}

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

