/* CSS für das Rezept-Layout */

.recipe-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    font-family: sans-serif;
}

.recipe-card h2 {
    margin-top: 0;
}

.recipe-card img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.recipe-details ul {
    list-style: none;
    padding: 0;
}

.recipe-ingredients ul, .recipe-instructions ol {
    padding-left: 20px;
}

/* --- Custom Numbering for Recipe Instructions (High Specificity) --- */

/* Reset counter and force remove list style on the list itself */
.recipe-container .recipe-instructions-list ol {
    counter-reset: instructions-counter;
    padding-left: 0 !important;
    margin-left: 0 !important;
    list-style: none !important;
    list-style-type: none !important;
}

/* Position the list item and force remove list style again for good measure */
.recipe-container .recipe-instructions-list li {
    list-style: none !important;
    list-style-type: none !important;
    counter-increment: instructions-counter;
    position: relative;
    padding-left: 55px;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

/* Aggressively hide the default list marker using the highest specificity */
.recipe-container .recipe-instructions-list li::marker {
    content: "" !important;
    display: none !important;
    font-size: 0 !important;
}

/* The custom number style */
.recipe-container .recipe-instructions-list li::before {
    content: counter(instructions-counter);
    position: absolute;
    left: 0;
    top: 0.7em; /* Half of the parent's line-height (1.4em) */
    transform: translateY(-50%); /* Center the circle on that line */
    width: 40px;
    height: 40px;
    background-color: #d32f2f;
    color: white;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 50%;
    /* Use line-height for perfect vertical centering of the number */
    text-align: center;
    line-height: 40px;
}

/* Recipe Details Box Styling */
.recipe-details-box {
    background: #f8f8f8;
    border: 2px solid #d32f2f;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.1);
}

.recipe-times {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.time-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    min-width: 140px;
}

.time-icon {
    font-size: 1.2em;
}

.time-label {
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
}

.time-value {
    color: #d32f2f;
    font-weight: bold;
    font-size: 0.95em;
}

.recipe-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.meta-icon {
    font-size: 1.1em;
}

.meta-label {
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
}

.meta-value {
    color: #d32f2f;
    font-weight: bold;
    font-size: 0.95em;
}

/* Star Rating (inline in time row) */
.rating-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rating-stars {
    display: flex;
    gap: 1px;
}

.rating-star {
    font-size: 1.8em;
    color: #ddd;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
    line-height: 1;
}

.rating-star.star-filled {
    color: #f5a623;
}

.rating-star.star-hover {
    color: #f5a623;
    transform: scale(1.15);
}

.rating-item.rated .rating-star {
    cursor: default;
}

.rating-info {
    font-size: 0.8em;
    color: #555;
}

.rating-avg {
    font-weight: 700;
    color: #d32f2f;
    font-size: 0.9em;
}

.rating-count {
    color: #888;
    font-size: 0.8em;
}

.rating-thanks {
    color: #46b450;
    font-weight: 600;
}

/* Diet badges */
.meta-item-diet .meta-value {
    font-size: 0.85em;
}

/* Nutrition Information (separate container) */
.recipe-nutrition-box {
    background: #f8f8f8;
    border: 2px solid #d32f2f;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.1);
}

.nutrition-heading {
    font-weight: 700;
    font-size: 1em;
    color: #333;
    margin-bottom: 12px;
}

.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.nutrition-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.nutrition-icon {
    font-size: 1.1em;
}

.nutrition-label {
    font-weight: 600;
    color: #333;
    font-size: 0.85em;
    flex: 1;
}

.nutrition-value {
    color: #d32f2f;
    font-weight: bold;
    font-size: 0.95em;
    white-space: nowrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .recipe-times {
        flex-direction: column;
    }
    
    .time-item, .meta-item {
        min-width: auto;
        width: 100%;
    }
    
    .recipe-meta {
        grid-template-columns: 1fr;
    }
    
    .nutrition-grid {
        grid-template-columns: 1fr 1fr;
    }
}
