/**
 * Recipe Ingredients Block - Frontend Styles
 */

.wp-block-recipe-ingredients {
    padding: 24px;
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    width: 100%;
}

.wp-block-recipe-ingredients h2 {
    margin-top: 0;
    margin-bottom: 1.25em;
    font-size: 1.3rem;
    font-weight: 700;
    color: #000000;
}

.recipe-servings-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f5f5f5;
    padding: 0.75em 1em;
    border-radius: 6px;
    margin-bottom: 1em;
}

.recipe-servings-control label {
    display: flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 500;
}

.recipe-servings-control label:before {
    content: '';
    display: inline-block;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='9' cy='7' r='4'%3E%3C/circle%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'%3E%3C/path%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'%3E%3C/path%3E%3C/svg%3E");
    width: 16px;
    height: 16px;
    background-size: contain;
    margin-right: 6px;
}

.recipe-servings-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.recipe-servings-control button {
    background-color: #ffffff;
    border: 1px solid #9e9e9e;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    padding: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.recipe-servings-control button:hover {
    background-color: #f8f8f8;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.recipe-servings-control button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.recipe-servings-control button svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

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

.ingredient-item {
    padding: 0.6em 0;
    transition: opacity 0.3s ease;
    font-size: 1rem;
}

@media only screen and (max-width: 767px) {
    .ingredient-item, .recipe-servings-control label{
        font-size: .875rem;
    }
    .wp-block-recipe-ingredients{
        padding: 0;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }
}

.ingredient-checkbox {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

.ingredient-check {
    margin-right: 10px;
    margin-top: 3px;
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #999;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    position: relative;
}

.ingredient-check:checked {
    background-color: #333333;
    border-color: #333333;
}

.ingredient-check:checked:after {
    content: '';
    position: absolute;
    left: 50%;
    top: 38%;
    width: 6px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -50%) rotate(45deg);
}

.ingredient-amount {
    font-weight: 600;
    margin-right: 0.25em;
}

.ingredient-unit {
    margin-right: 0.25em;
    font-weight: 500;
}

.ingredient-item.checked {
    opacity: 0.6;
    text-decoration: line-through;
    color: #888;
}