/**
 * SCCC Intake Form Styles
 * Styles for the availability grid and multi-step form
 */

/* Form Wrapper */
.intake-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Progress Indicator */
.intake-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.intake-progress::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 25%;
    right: 25%;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
    font-size: 14px;
    color: #999;
}

.progress-step::before {
    content: '';
    display: block;
    width: 30px;
    height: 30px;
    background: #e0e0e0;
    border-radius: 50%;
    margin: 0 auto 10px;
    border: 3px solid #fff;
}

.progress-step.active::before {
    background: #f4c46e;
}

.progress-step.active {
    color: #333;
    font-weight: 600;
}

.progress-step.completed::before {
    background: #5cb85c;
}

/* Form Sections */
.form-section {
    background: #f9f9f9;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
}

.form-section h3 {
    margin: 0 0 20px;
    color: #333;
    font-size: 20px;
}

.help-text {
    color: #666;
    font-size: 14px;
    margin: -10px 0 20px;
}

/* Form Elements */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-group label {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.radio-group label:hover {
    border-color: #f4c46e;
    background: #fffbf0;
}

.radio-group input[type="radio"] {
    margin-right: 10px;
}

.radio-group input[type="radio"]:checked + label,
.radio-group label:has(input:checked) {
    border-color: #f4c46e;
    background: #fffbf0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #f4c46e;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
}

/* Availability Grid */
.availability-grid {
    overflow-x: auto;
    margin: 20px 0;
}

.availability-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.availability-table th,
.availability-table td {
    padding: 8px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.availability-table thead th {
    background: #f5f5f5;
    font-weight: 600;
    font-size: 14px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.time-label {
    background: #f9f9f9;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    text-align: left !important;
    position: sticky;
    left: 0;
    z-index: 5;
}

.slot-cell {
    position: relative;
    padding: 0;
    width: 50px;
    height: 40px;
}

.slot-checkbox {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.slot-label {
    display: block;
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    transition: all 0.2s;
    cursor: pointer;
}

.slot-checkbox:hover + .slot-label {
    background: #e0e0e0;
}

.slot-checkbox:checked + .slot-label {
    background: #f4c46e;
    position: relative;
}

.slot-checkbox:checked + .slot-label::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: bold;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #f4c46e;
    color: #333;
}

.btn-primary:hover:not(:disabled) {
    background: #e6b75f;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* Loader Overlay */
.intake-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader-content {
    text-align: center;
    color: #fff;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Alerts */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Success State */
.intake-success {
    text-align: center;
    padding: 60px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #5cb85c;
    color: #fff;
    font-size: 40px;
    line-height: 80px;
    border-radius: 50%;
    margin: 0 auto 30px;
}

.intake-success h2 {
    color: #333;
    margin-bottom: 20px;
}

.intake-success p {
    color: #666;
    font-size: 18px;
    margin-bottom: 10px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .intake-form-wrapper {
        padding: 10px;
    }
    
    .form-section {
        padding: 20px;
    }
    
    .availability-table {
        font-size: 12px;
    }
    
    .slot-cell {
        width: 40px;
        height: 35px;
    }
    
    .time-label {
        font-size: 11px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}