/* Calculator-specific styles that extend the shared styles */

/* Button styles (extending shared styles) */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 150ms ease-in-out;
    outline: none;
    cursor: pointer;
}

.btn:focus {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

.btn-primary {
    background-color: rgb(59, 130, 246);
    color: white;
}

.btn-primary:hover {
    background-color: rgb(37, 99, 235);
}

.btn-secondary {
    background-color: white;
    color: rgb(75, 85, 99);
    border: 1px solid rgb(209, 213, 219);
}

.btn-secondary:hover {
    background-color: rgb(249, 250, 251);
}

.btn-icon {
    padding: 0.375rem;
    color: rgb(107, 114, 128);
    border-radius: 0.25rem;
    transition: all 150ms ease-in-out;
}

.btn-icon:hover {
    color: rgb(59, 130, 246);
    background-color: rgb(243, 244, 246);
}

.input-field {
    width: 100%;
    padding: 0.375rem 0.5rem;
    border: 1px solid rgb(209, 213, 219);
    border-radius: 0.25rem;
    font-size: 0.875rem;
    transition: border-color 150ms ease-in-out;
}

.input-field:focus {
    outline: none;
    border-color: rgb(59, 130, 246);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.5);
}

.input-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgb(75, 85, 99);
    margin-bottom: 0.25rem;
}

.table-cell {
    padding: 0.5rem;
    font-size: 0.875rem;
}

/* Enhanced mobile responsiveness */
@media (max-width: 768px) {
    .table-cell {
        padding: 0.25rem;
        font-size: 0.75rem;
    }
    
    /* Ensure minimum widths for readability */
    th:nth-child(1), td:nth-child(1) { min-width: 80px; } /* Street */
    th:nth-child(2), td:nth-child(2) { min-width: 60px; } /* Movement */
    th:nth-child(3), td:nth-child(3) { min-width: 50px; } /* Grade */
    th:nth-child(4), td:nth-child(4) { min-width: 50px; } /* Speed */
    th:nth-child(5), td:nth-child(5) { min-width: 45px; } /* Entry Speed */
    th:nth-child(6), td:nth-child(6) { min-width: 50px; } /* Width */
    th:nth-child(7), td:nth-child(7) { min-width: 55px; } /* Yellow */
    th:nth-child(8), td:nth-child(8) { min-width: 50px; } /* Red */
    th:nth-child(9), td:nth-child(9) { min-width: 70px; } /* Total */
}

@media (max-width: 480px) {
    .table-cell {
        padding: 0.125rem;
        font-size: 0.625rem;
    }
    
    /* Further compress on very small screens */
    th:nth-child(1), td:nth-child(1) { min-width: 70px; }
    th:nth-child(2), td:nth-child(2) { min-width: 50px; }
    th:nth-child(3), td:nth-child(3) { min-width: 40px; }
    th:nth-child(4), td:nth-child(4) { min-width: 40px; }
    th:nth-child(5), td:nth-child(5) { min-width: 35px; }
    th:nth-child(6), td:nth-child(6) { min-width: 40px; }
    th:nth-child(7), td:nth-child(7) { min-width: 45px; }
    th:nth-child(8), td:nth-child(8) { min-width: 40px; }
    th:nth-child(9), td:nth-child(9) { min-width: 60px; }
}

