.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

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

.close-modal {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--muted-light);
}

.close-modal:hover {
    color: var(--dark);
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section p {
    white-space: pre-wrap;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.portion-section {
    display: flex;
    align-items: center;
}

.portion-control {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-light);
    padding: 8px 16px;
    border-radius: 10px;
}

.portion-label {
    font-weight: 600;
    color: var(--dark);
    margin-right: 4px;
}

.btn-portion {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    font-size: 1.3em;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
    line-height: 1;
}

.btn-portion:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.btn-portion:active {
    transform: scale(0.95);
}

.portion-value {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--dark);
    min-width: 28px;
    text-align: center;
}

.modal-actions--end {
    justify-content: flex-end;
}
