/* Form Styles */
.grocery-form {
    display: flex;
    align-items: center; /* ✅ Ensures input and button align properly */
    gap: 0.75rem;
    margin: 1.5rem 0; /* ✅ Balanced spacing above and below */
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-input {
    flex: 1;
    padding: 0.75rem 1rem; /* ✅ Matches button height */
    border: 2px solid var(--color-border);
    border-radius: 12px;
    font-size: 1rem;
    font-family: "DM Sans", sans-serif;
    color: var(--color-text);
    background: var(--color-card);
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(74, 124, 44, 0.1);
}

.form-input::placeholder {
    color: var(--color-text-muted);
    font-weight: 400;
}

.form-submit {
    padding: 0.75rem 1.25rem; /* ✅ Matches input height */
    background: linear-gradient(
        135deg,
        var(--color-primary),
        var(--color-primary-light)
    );
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: "DM Sans", sans-serif;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(45, 80, 22, 0.2);
    white-space: nowrap;
    display: flex;
    align-items: center; /* ✅ Ensures text is vertically centered */
    justify-content: center;
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 80, 22, 0.3);
}

.form-submit:active {
    transform: translateY(0);
}

/* Accessibility: visually hidden label */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
