/* Final Grade Calculator Table Layout */
.calc-table-header {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    color: #333;
}

.calc-table-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.calc-col-name {
    flex: 2;
    min-width: 150px;
}

.calc-col-grade {
    flex: 1;
    min-width: 80px;
}

.calc-col-weight {
    flex: 1;
    min-width: 80px;
}

/* Calculator Input Fields */
.calc-form-horizontal input,
.calc-form-horizontal .form-control {
    color: #333;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    width: 100%;
}

.calc-form-horizontal input:focus,
.calc-form-horizontal .form-control:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

.calc-form-horizontal input::placeholder {
    color: #999;
}

/* Calculator Labels */
.calc-form-horizontal label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    text-transform: uppercase;
	    width: 170px !important;
}

/* Calculator Headings */
.calculator h2,
.calculator h3 {
    color: #333;
}

.calculator p {
    color: #555;
}

/* Buttons */
.btn_blue,
.btn_green,
.btn_red {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 10px;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.btn_blue {
    background-color: #2196F3;
    color: #fff;
}

.btn_blue:hover {
    background-color: #1976D2;
}

.btn_green {
    background-color: #4CAF50;
    color: #fff;
}

.btn_green:hover {
    background-color: #388E3C;
}

.btn_red {
    background-color: #f44336;
    color: #fff;
}

.btn_red:hover {
    background-color: #d32f2f;
}

/* Result Box */
#result {
    margin-top: 20px;
    padding: 20px;
    background-color: #e8f5e9;
    border: 2px solid #4CAF50;
    border-radius: 8px;
    color: #1b5e20;
}

#result .result {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
    color: #1b5e20 !important;
}

#result #final-grade-needed {
    font-size: 28px;
    font-weight: bold;
    color: #2e7d32;
    display: block;
    margin: 10px 0;
}

#result #interpretation {
    margin-top: 15px;
    font-size: 14px;
    color: #333;
}

#result #interpretation p {
    margin-bottom: 8px;
    color: #333;
    line-height: 1.6;
}

#result #interpretation strong {
    color: #1b5e20;
}

#result #interpretation small {
    color: #666;
    font-size: 12px;
}

/* Error Box */
#resultError {
    margin-top: 20px;
    padding: 15px 20px;
    background-color: #ffebee;
    border: 2px solid #f44336;
    border-radius: 8px;
    color: #c62828;
}

#resultError p {
    color: #c62828;
    font-weight: 600;
    font-size: 14px;
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .calc-table-header {
        display: none;
    }
    
    .calc-table-row {
        flex-direction: column;
        gap: 5px;
        margin-bottom: 15px;
        padding: 10px;
        border: 1px solid #e0e0e0;
        border-radius: 5px;
        background-color: #fafafa;
    }
    
    .calc-col-name,
    .calc-col-grade,
    .calc-col-weight {
        flex: 1;
        min-width: 100%;
    }
    
    .btn_blue,
    .btn_green,
    .btn_red {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    #result #final-grade-needed {
        font-size: 24px;
    }
}

/* Desktop Responsive Adjustments */
@media (max-width: 480px) {
    .calculator {
        padding: 15px;
    }
    
    .calc-form-horizontal input,
    .calc-form-horizontal .form-control {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .calc-form-horizontal label {
        font-size: 12px;
    }
    
    #result {
        padding: 15px;
    }
    
    #result #final-grade-needed {
        font-size: 20px;
    }
}
/* Final Grade Calculator Table Fixes */
.tool-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 14px;
    table-layout: fixed;
}

.tool-content table th,
.tool-content table td {
    width: auto;
    text-align: left;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    vertical-align: middle;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.tool-content table th {
    background: #f5f5f5;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tool-content table td {
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

/* First column slightly wider for assignment names */
.tool-content table th:first-child,
.tool-content table td:first-child {
    width: 30%;
}

/* Last column (Feasibility/Notes) gets more space */
.tool-content table th:last-child,
.tool-content table td:last-child {
    width: 30%;
    white-space: normal;
}

/* Middle columns equal width */
.tool-content table th:nth-child(2),
.tool-content table td:nth-child(2) {
    width: 20%;
}

.tool-content table th:nth-child(3),
.tool-content table td:nth-child(3) {
    width: 20%;
}

/* Zebra striping for better readability */
.tool-content table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.tool-content table tbody tr:hover {
    background-color: #f0f7ff;
}

/* Emoji and status text alignment */
.tool-content table td:last-child {
    font-weight: 500;
}

/* Responsive table for mobile */
@media (max-width: 768px) {
    .tool-content table {
        font-size: 13px;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .tool-content table th,
    .tool-content table td {
        padding: 10px 12px;
        font-size: 13px;
        min-width: 100px;
    }
    
    .tool-content table th:first-child,
    .tool-content table td:first-child {
        min-width: 150px;
    }
}

@media (max-width: 480px) {
    .tool-content table th,
    .tool-content table td {
        padding: 8px 10px;
        font-size: 12px;
    }
}