/* Final Grade Calculator Specific Styles */

/* Form Styling */
.calculator-form {
    padding: 0;
}

/* Input Row for side-by-side inputs */
.input-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.input-row .form-input {
    flex: 1;
}

.input-or {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

/* Select dropdown styling */
.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23003049' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

.form-select:hover {
    border-color: #003049;
    background-color: #f8fafc;
}

.form-select:focus {
    border-color: #003049;
    box-shadow: 0 0 0 3px rgba(0, 48, 73, 0.1);
    outline: none;
}

/* Main Result Display */
.result-main {
    text-align: center;
    padding: 20px;
    margin-bottom: 16px;
    background: linear-gradient(to bottom right, #f0f9ff, #e0f2fe);
    border-radius: 8px;
    border: 1px solid #bae6fd;
}

.result-needed {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-label {
    font-size: 16px;
    color: #003049;
    font-weight: 500;
}

.result-value {
    font-size: 36px;
    font-weight: 700;
    color: #003049;
}

/* Achievability Message */
.achievability-message {
    margin-top: 12px;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.achievability-message.achievable {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.achievability-message.difficult {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.achievability-message.impossible {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.achievability-message.easy {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 0;
}

.results-item {
    color: #003049;
    font-size: 16px;
}

.results-value {
    font-weight: 500;
    font-size: 16px;
}

/* Show Scenarios Checkbox */
.show-scenarios {
    margin-top: 16px;
    padding-top: 8px;
    border-top: 1px solid #bae6fd;
}

/* Scenarios Section */
.scenarios-description {
    color: #4b5563;
    margin-bottom: 16px;
    font-size: 14px;
}

/* Scenarios Table Styling */
.scenarios-table {
    width: 100%;
    border-collapse: collapse;
}

.scenarios-table th,
.scenarios-table td {
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.scenarios-table th {
    background-color: #f3f4f6;
    color: #003049;
    font-weight: 600;
    font-size: 14px;
}

.scenarios-table td {
    color: #374151;
    font-size: 14px;
}

.scenarios-table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.scenarios-table tbody tr:hover {
    background-color: #f0f9ff;
}

.scenarios-table tbody tr.highlight {
    background-color: #dbeafe;
    font-weight: 600;
}

.scenarios-table tbody tr.target-row {
    background-color: #dcfce7;
    font-weight: 600;
}

/* Letter grade badges in table */
.grade-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.grade-badge.grade-a {
    background-color: #dcfce7;
    color: #166534;
}

.grade-badge.grade-b {
    background-color: #dbeafe;
    color: #1e40af;
}

.grade-badge.grade-c {
    background-color: #fef3c7;
    color: #92400e;
}

.grade-badge.grade-d {
    background-color: #fed7aa;
    color: #9a3412;
}

.grade-badge.grade-f {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Mobile Responsive Styling */
@media (max-width: 640px) {
    .input-row {
        flex-direction: column;
        gap: 8px;
    }

    .input-or {
        display: none;
    }

    .results-grid {
        gap: 12px;
    }

    .result-value {
        font-size: 28px;
    }

    .scenarios-table th,
    .scenarios-table td {
        padding: 8px 4px;
        font-size: 13px;
    }
}
