/* CRS Calculator Styles */

.crs-calculator-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Header */
.crs-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.crs-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
    font-weight: 700;
}

.crs-header p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Disclaimer */
.crs-disclaimer {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: #856404;
}

/* Progress Bar */
.crs-progress {
    margin-bottom: 2rem;
}

.crs-progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.crs-progress-fill {
    height: 100%;
    background-color: red;
    transition: width 0.3s ease;
}

.crs-progress-text {
    text-align: center;
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

/* Form Styles */
.crs-form {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.crs-step {
    padding: 2rem;
}

.crs-step h3 {
    margin: 0 0 1.5rem 0;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.crs-step-description {
    color: #6c757d;
    font-style: italic;
    margin-bottom: 1.5rem;
}

.crs-form-group {
    margin-bottom: 1.5rem;
}

.crs-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

.crs-form-group input,
.crs-form-group select,
.crs-form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: white;
}

.crs-form-group input:focus,
.crs-form-group select:focus,
.crs-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.crs-form-group input[type="number"] {
    -moz-appearance: textfield;
}

.crs-form-group input[type="number"]::-webkit-outer-spin-button,
.crs-form-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Language Sections */
.crs-language-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.crs-language-section h4 {
    margin: 0 0 1rem 0;
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Navigation */
.crs-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.crs-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.crs-btn-primary {
    background: #215387;
    color: #FFFFFF;
}

.crs-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.crs-btn-secondary {
    background: #6c757d;
    color: white;
}

.crs-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.crs-btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.crs-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

/* Results Section */
.crs-results {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: 2rem;
}

.crs-results h3 {
    margin: 0 0 1.5rem 0;
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
}

.crs-total-score {
    text-align: center;
    margin-bottom: 2rem;
}

.crs-total-score span {
    font-size: 4rem;
    font-weight: 700;
    color: #667eea;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.crs-score-breakdown {
    margin-bottom: 2rem;
}

.crs-score-breakdown h4 {
    margin: 0 0 1rem 0;
    color: #495057;
    font-size: 1.3rem;
    font-weight: 600;
}

.crs-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

.crs-breakdown-item .description {
    font-weight: 500;
    color: #495057;
}

.crs-breakdown-item .points {
    font-weight: 600;
    color: #667eea;
    font-size: 1.1rem;
}

.crs-recent-cutoffs {
    background: #e3f2fd;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.crs-recent-cutoffs h4 {
    margin: 0 0 1rem 0;
    color: #1976d2;
    font-size: 1.2rem;
    font-weight: 600;
}

.crs-cutoff-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #bbdefb;
}

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

.crs-cutoff-date {
    color: #424242;
    font-weight: 500;
}

.crs-cutoff-score {
    font-weight: 600;
    color: #1976d2;
}

.crs-status-likely {
    color: #28a745;
    font-weight: 600;
}

.crs-status-possible {
    color: #ffc107;
    font-weight: 600;
}

.crs-status-unlikely {
    color: #dc3545;
    font-weight: 600;
}

/* Summary */
.crs-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
}

.crs-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

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

.crs-summary-label {
    font-weight: 500;
    color: #495057;
}

.crs-summary-value {
    font-weight: 600;
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    .crs-calculator-container {
        margin: 0 1rem;
    }
    
    .crs-header {
        padding: 1.5rem;
    }
    
    .crs-header h2 {
        font-size: 2rem;
    }
    
    .crs-step {
        padding: 1.5rem;
    }
    
    .crs-navigation {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 1.5rem;
    }
    
    .crs-btn {
        width: 100%;
    }
    
    .crs-total-score span {
        font-size: 3rem;
    }
    
    .crs-breakdown-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .crs-cutoff-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

@media (max-width: 480px) {
    .crs-header h2 {
        font-size: 1.5rem;
    }
    
    .crs-header p {
        font-size: 1rem;
    }
    
    .crs-step {
        padding: 1rem;
    }
    
    .crs-results {
        padding: 1.5rem;
    }
    
    .crs-total-score span {
        font-size: 2.5rem;
    }
}

/* Animation for step transitions */
.crs-step {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Loading state */
.crs-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error states */
.crs-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #721c24;
}

.crs-form-group.error input,
.crs-form-group.error select,
.crs-form-group.error textarea {
    border-color: #dc3545;
}

.crs-form-group.error .error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Success states */
.crs-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #155724;
}

/* Accessibility */
.crs-form-group input:focus,
.crs-form-group select:focus,
.crs-form-group textarea:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.crs-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .crs-calculator-container {
        border: 2px solid #000;
    }
    
    .crs-form-group input,
    .crs-form-group select,
    .crs-form-group textarea {
        border: 2px solid #000;
    }
    
    .crs-btn {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .crs-step,
    .crs-progress-fill,
    .crs-btn {
        transition: none;
    }
    
    .crs-loading {
        animation: none;
    }
}
