/**
 * Major Finder BD - Frontend Styles
 * Version: 1.0.0
 */

/* Container */
.mfb-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: 'SolaimanLipi', 'Kalpurush', Arial, sans-serif;
    line-height: 1.6;
}

/* Steps */
.mfb-step {
    animation: mfbFadeIn 0.5s ease;
}

.mfb-active {
    display: block !important;
}

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

/* Cards */
.mfb-form-card,
.mfb-quiz-card,
.mfb-results-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Typography */
.mfb-title {
    color: #2596be;
    font-size: 2em;
    text-align: center;
    margin-bottom: 10px;
    font-weight: bold;
}

.mfb-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1em;
    margin-bottom: 30px;
}

/* Form Elements */
.mfb-form {
    max-width: 100%;
}

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

.mfb-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
    font-size: 1em;
}

.mfb-required {
    color: #e74c3c;
    margin-left: 3px;
}

.mfb-form-group input,
.mfb-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.mfb-form-group input:focus,
.mfb-form-group select:focus {
    border-color: #2596be;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 150, 190, 0.1);
}

/* Consent Checkbox */
.mfb-consent {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.mfb-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
}

.mfb-checkbox input {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Buttons */
.mfb-btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1.1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    font-family: inherit;
}

.mfb-btn-primary {
    background: linear-gradient(135deg, #2596be 0%, #1a7a9a 100%);
    color: white;
    width: 100%;
}

.mfb-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 150, 190, 0.4);
}

.mfb-btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #ddd;
}

.mfb-btn-secondary:hover {
    background: #e9ecef;
    border-color: #ccc;
}

.mfb-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Navigation Buttons */
.mfb-nav-buttons {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 15px;
    margin-top: 20px;
}

/* Progress Bar */
.mfb-progress-bar {
    background: #e9ecef;
    height: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    overflow: hidden;
}

.mfb-progress {
    background: linear-gradient(90deg, #2596be 0%, #1a7a9a 100%);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

/* Question Counter */
.mfb-question-counter {
    text-align: center;
    color: #666;
    margin-bottom: 10px;
    font-size: 0.95em;
}

/* Department Badge */
.mfb-dept-badge {
    text-align: center;
    background: #e0f5fa;
    color: #2596be;
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
    margin: 0 auto 20px;
    font-weight: bold;
    font-size: 0.95em;
}

/* Question Box */
.mfb-question-box {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-left: 4px solid #2596be;
}

.mfb-question-box h3 {
    text-align: center;
    color: #333;
    margin: 0;
    font-size: 1.2em;
}

/* Options Container */
.mfb-options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.mfb-option-btn {
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 1em;
    font-family: inherit;
    color: #333;
}

.mfb-option-btn:hover {
    border-color: #2596be;
    background: #f0fbff;
}

.mfb-option-btn.selected {
    border-color: #2596be;
    background: linear-gradient(135deg, #2596be 0%, #1a7a9a 100%);
    color: white;
}

/* Department Notice */
.mfb-dept-notice {
    background: #fff3cd;
    border: 2px solid #ffc107;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.mfb-dept-notice strong {
    display: block;
    margin-bottom: 5px;
    font-size: 1.1em;
}

/* Majors Container */
.mfb-majors-container {
    margin-bottom: 25px;
}

.mfb-major-card {
    background: linear-gradient(135deg, #2596be 0%, #1a7a9a 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.mfb-major-card:hover {
    transform: translateY(-3px);
}

.mfb-major-card h4 {
    color: white;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.mfb-match-score {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    margin-bottom: 10px;
    font-weight: bold;
}

.mfb-major-card p {
    line-height: 1.6;
    margin-bottom: 10px;
}

/* Analysis Box */
.mfb-analysis-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.mfb-analysis-box h3 {
    color: #2596be;
    margin-bottom: 15px;
    font-size: 1.2em;
}

#mfb-analysis-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

#mfb-analysis-content li {
    margin-bottom: 8px;
    color: #666;
}

/* Action Buttons */
.mfb-action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Loading Spinner */
.mfb-loading {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 15px;
}

.mfb-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2596be;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: mfbSpin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Submit Status Messages */
.mfb-submit-message {
    text-align: center;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: bold;
}

.mfb-submit-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .mfb-form-card,
    .mfb-quiz-card,
    .mfb-results-card {
        padding: 20px;
    }
    
    .mfb-title {
        font-size: 1.6em;
    }
    
    .mfb-nav-buttons,
    .mfb-action-buttons {
        grid-template-columns: 1fr;
    }
    
    .mfb-option-btn {
        padding: 12px 15px;
        font-size: 0.95em;
    }
}

@media (max-width: 480px) {
    .mfb-container {
        padding: 10px;
    }
    
    .mfb-title {
        font-size: 1.4em;
    }
    
    .mfb-form-group input,
    .mfb-form-group select {
        padding: 10px 12px;
        font-size: 0.95em;
    }
}

/* Print Styles */
@media print {
    .mfb-btn,
    .mfb-nav-buttons,
    .mfb-action-buttons {
        display: none;
    }
    
    .mfb-major-card {
        page-break-inside: avoid;
    }
}

/* Accessibility */
.mfb-option-btn:focus,
.mfb-btn:focus,
.mfb-form-group input:focus,
.mfb-form-group select:focus {
    outline: 2px solid #2596be;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .mfb-option-btn,
    .mfb-btn {
        border-width: 3px;
    }
    
    .mfb-form-group input,
    .mfb-form-group select {
        border-width: 3px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .mfb-step,
    .mfb-progress,
    .mfb-btn,
    .mfb-option-btn,
    .mfb-major-card {
        transition: none;
        animation: none;
    }
}
