.page {
    max-width: 1000px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-title {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.add-button {
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: black;
    color: white;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.add-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.shopping-section {
    margin-bottom: 32px;
}

.section-title {
    margin: 0 0 14px 0;
    font-size: 22px;
}

.shopping-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.shopping-item {
    padding: 14px 16px;
    border-bottom: 1px solid #eaeaea;
}

.shopping-item:last-child {
    border-bottom: none;
}

.shopping-row {
    display: grid;
    grid-template-columns: 24px 1fr;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.shopping-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.shopping-row input[type="checkbox"]:checked {
    transform: scale(1.15);
}

.shopping-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.shopping-row input:checked + .shopping-content {
    opacity: 0.5;
}

.shopping-row input:checked + .shopping-content .shopping-name {
    text-decoration: line-through;
}

.shopping-name {
    font-weight: 500;
    font-size: 16px;
}

.shopping-quantity {
    color: #444;
    font-size: 15px;
    text-align: right;
}

.shopping-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.empty-state {
    color: #777;
    text-align: center;
    padding: 32px 0;
}

.form-group {
    margin-bottom: 16px;
}

input,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 15px;
    box-sizing: border-box;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    width: 90%;
    max-width: 420px;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.modal h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
}

.btn-primary {
    background: black;
    color: white;
}

.btn-secondary {
    background: #eaeaea;
}

.btn-danger {
    background: #ffd9d9;
}   

.errorlist {
    color: #c00000;
    padding-left: 18px;
    margin-top: 6px;
    margin-bottom: 0;
}

.shopping-name-with-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.shopping-info-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.info-button {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: #eaeaea;
    color: #111;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.shopping-tooltip {
    display: none;
    position: absolute;
    top: 28px;
    left: 0;
    min-width: 220px;
    max-width: 320px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    padding: 10px 12px;
    z-index: 20;
}

.shopping-tooltip-line {
    display: block;
    font-size: 13px;
    color: #333;
    margin-bottom: 6px;
}

.shopping-tooltip-line:last-child {
    margin-bottom: 0;
}

.shopping-info-wrapper:hover .shopping-tooltip,
.shopping-info-wrapper:focus-within .shopping-tooltip {
    display: block;
}

.inline-helper {
    margin-top: 10px;
}

.inline-helper .btn {
    width: 100%;
}

.ingredient-search-input {
    width: 100%;
}

.form-group {
    position: relative;
}

.custom-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    max-height: 220px;
    overflow-y: auto;
    z-index: 30;
}

.custom-search-option {
    width: 100%;
    border: none;
    background: white;
    text-align: left;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 15px;
}

.custom-search-option:hover {
    background: #f5f5f5;
}

.hidden {
    display: none;
}