/*
 * Main stylesheet
 * Imports all partial CSS files.
 */

@import url('_variables.css');
@import url('_base.css');
@import url('_layout.css');
@import url('_components.css');
@import url('_modal.css');
@import url('_utility.css');
@import url('_responsive.css');

/* New styles for updated features */
.carb-fill-btn {
    background-color: var(--carb-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.85em;
    cursor: pointer;
    min-width: 60px;
    margin-left: auto;
}

.carb-fill-btn:hover {
    filter: brightness(0.9);
}

.section-toggle-empty-btn {
    background: #3399FF;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    padding: 0 4px;
    margin-right: 5px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.section-toggle-empty-btn:hover {
    opacity: 1.0;
    transform: scale(1.1);
}

/* Fix for small click target on items */
.checklist-item {
    display: flex;
    align-items: center;
    padding: 2px 5px; /* Minimal padding for the row container */
    border-bottom: 1px solid #f0f0f0; /* Optional: adds subtle separation */
}

.checklist-item-label {
    flex-grow: 1; /* Takes up all available space between checkbox and amount */
    padding: 10px 5px; /* Increases the hit area vertically and horizontally */
    cursor: pointer;
    display: inline-block; /* Ensures padding works */
}

/* Ensure checkbox doesn't shrink */
.checklist-item input[type="checkbox"] {
    margin-right: 5px;
    flex-shrink: 0;
}

/* Revert to compact height but keep hit area */
.checklist-item-label {
    padding: 4px 5px; /* Reduced from 10px to 4px for compact height */
}

/* --- Offline Mode Styles --- */
#offline-toast {
    position: fixed; /* Using fixed for floating notification behavior */
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%); /* Centers the element relative to its width */
    width: auto;
    max-width: 90vw;
    background-color: #f0ad4e; /* Warning Orange / Golden Brown */
    color: #fff;
    text-align: center;
    padding: 12px 20px;
    border-radius: 6px;
    z-index: 10000;
    display: none; /* Hidden by default */
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    font-size: 0.95em;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
}

#offline-toast.show,
body.offline-mode #offline-toast {
    display: block;
    opacity: 1;
    bottom: 30px;
}

/* When offline, disable interactions on form elements but allow scrolling */
body.offline-mode input,
body.offline-mode button:not(.nav-btn),
body.offline-mode select,
body.offline-mode textarea {
    pointer-events: none;
    opacity: 0.6;
    filter: grayscale(0.5);
}

/* Ensure main containers still scroll */
body.offline-mode .main-container {
    opacity: 1;
    filter: none;
}

/* --- Dual Input Wrapper Styles --- */
.inputs-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 5px 0;
    background-color: #f9f9f9;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #eee;
}

.input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-row label {
    font-weight: bold;
    font-size: 0.9em;
    width: 80px; /* Fixed width labels for alignment */
    color: #555;
}

/* Style for the new up/down emoji buttons */
.adjust-btn {
    font-size: 1.1rem;
    padding: 3px 8px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none;
}

.adjust-btn:active {
    background-color: #e2e6ea;
}

/* Ensure both inputs look similar */
.input-row input[type="number"] {
    text-align: center;
    width: 70px;
    font-size: 1.0rem;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

/* Mini arrows for tables */
.mini-adjust-btn {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
}
.mini-adjust-btn:hover {
    background-color: #f0f0f0;
}

/* Added by refactor script: Style for main group headers */
.main-group-header {
    background-color: aliceblue;
}
