/* Responsive and Utility Styles */

/* Utility Classes */
.less-visible {
    opacity: 0.4;
    color: #888 !important;
    background: #f0f0f0 !important;
}

.less-visible .other-action-cell, .less-visible td.other-action-cell {
    background: #fff !important;
    opacity: 1 !important;
}

.message {
    margin-top: 20px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

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

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

.cache-controls {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.cache-controls h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
}

.cache-btn {
    background-color: #6c757d;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    margin-right: 10px;
    transition: background-color 0.3s;
}

.cache-btn:hover {
    background-color: #5a6268;
}

.cache-status {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
}

/* Responsive Design for smaller screens */
@media screen and (max-width: 768px) {
    /* Reduce title column width on mobile */
    .ingredients-table td:first-child, .ingredients-table th:first-child {
        width: 160px;
        min-width: 160px;
        max-width: 160px;
        font-size: 0.9em;
    }
    
    /* Make GGN and Lot# fields longer on mobile */
    .ingredients-table td:nth-child(2) input[type="text"],
    .ingredients-table td:nth-child(3) input[type="text"] {
        min-width: 120px;
        width: 100%;
    }
    
    /* Adjust table layout for mobile */
    .ingredients-table {
        font-size: 0.95em;
    }
    
    /* Reduce padding on mobile */
    th, td {
        padding: 0px 2px;
    }
    
    /* Make form more compact on mobile */
    form {
        padding: 12px;
    }
    
    /* Adjust form row spacing on mobile */
    .form-row {
        gap: 8px;
        margin-bottom: 8px;
    }
    
    /* Make form rows stack vertically on mobile */
    .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    /* Adjust date row for mobile */
    .date-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    /* Make batch display container full width on mobile */
    .batch-display-container {
        margin-left: 0;
        width: 100%;
    }
    
    /* Make inputs full width on mobile */
    .date-input,
    #producer_select,
    #producer,
    #sauce_for {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Adjust sauce-for-group for mobile */
    .sauce-for-group {
        margin-left: 0;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    /* Ensure sauce_for select is left-aligned */
    .sauce-for-group #sauce_for {
        align-self: flex-start;
        text-align: left;
    }
    
    /* Make labels full width on mobile */
    .form-row label {
        width: 100%;
        margin-bottom: 2px;
    }
}

/* Extra small screens (phones) */
@media screen and (max-width: 480px) {
    /* Further reduce title column width on very small screens */
    .ingredients-table td:first-child, .ingredients-table th:first-child {
        width: 140px;
        min-width: 140px;
        max-width: 140px;
        font-size: 0.85em;
    }
    
    /* Make GGN and Lot# fields even longer on very small screens */
    .ingredients-table td:nth-child(2) input[type="text"],
    .ingredients-table td:nth-child(3) input[type="text"] {
        min-width: 100px;
        width: 100%;
    }
    
    /* Reduce overall font size */
    body {
        font-size: 0.9em;
    }
    
    /* Make form even more compact */
    form {
        padding: 8px;
    }
    
    /* Adjust main title size */
    h1 {
        font-size: 1.3em;
        margin-bottom: 12px;
    }
} 