/* Form Components */
/* Serving input */
.serving-input {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.serving-input input {
    width: 80px;
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
    font-size: 1.1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
}

.serving-input input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--accent-primary);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
}

.toggle-labels {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    justify-content: center;
}

.toggle-label {
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.toggle-label.active {
    color: var(--text-primary);
    font-weight: 600;
}

/* Filter controls */
.filter-section {
    background: var(--bg-secondary);
    padding: var(--spacing-lg);
    border-radius: 12px;
    box-shadow: 0 4px 6px var(--shadow-light);
    margin-bottom: var(--spacing-xl);
    border: 1px solid var(--border-color);
}

.filter-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.3rem;
    text-align: center;
}

.filter-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-group label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: var(--font-size-base);
}

.filter-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem var(--spacing-md);
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-checkbox:hover {
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
}

.filter-checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.filter-checkbox label {
    cursor: pointer;
    font-weight: 400;
    margin: 0;
}

.filter-select {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: var(--font-size-base);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.filter-select:hover {
    border-color: var(--accent-primary);
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.filter-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-top: var(--spacing-md);
}

/* Measurement toggle */
.measurement-toggle {
    margin-bottom: 1.5rem;
    padding: var(--spacing-md);
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.measurement-toggle h4 {
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    font-size: var(--font-size-base);
}

/* Responsive forms */
@media screen and (max-width: 768px) {
    .serving-input {
        flex-direction: column;
        gap: 0.5rem;
    }

    .filter-checkboxes {
        flex-direction: column;
    }

    .filter-actions {
        flex-direction: column;
    }
}

