/*
 * Recipe Card Baseline Styles v1.0.0
 * 
 * MINIMAL, neutral styling for RecipeForge .recipe-card blocks.
 * Provides structure, spacing, and basic readability.
 * Does NOT impose colors or typography — child themes override everything.
 * Loads at priority 99 (low) so any theme CSS wins by specificity or cascade.
 *
 * Selector reference: RECIPE_CARD_REFERENCE.md
 */

/* ===== Container ===== */
.recipe-card {
    max-width: 100%;
    margin: 2rem auto;
    padding: 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-sizing: border-box;
}

/* ===== Featured Image ===== */
.recipe-floating-image {
    width: 100%;
    overflow: hidden;
}

.recipe-floating-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* ===== Header ===== */
.recipe-header {
    padding: 1.5rem 1.5rem 0;
}

.recipe-title-section {
    text-align: center;
}

.recipe-title {
    font-size: 1.5rem;
    line-height: 1.3;
    margin: 0 0 0.5rem;
}

.recipe-description {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 1rem;
    opacity: 0.85;
}

/* ===== Meta (Times + Servings) ===== */
.recipe-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.recipe-time {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.time-item,
.servings-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.time-icon,
.servings-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Clock icon for time items */
.time-icon::before {
    content: "⏱";
    font-size: 1.2rem;
    display: block;
    text-align: center;
    line-height: 24px;
}

/* Servings icon */
.servings-icon::before {
    content: "🍽";
    font-size: 1.2rem;
    display: block;
    text-align: center;
    line-height: 24px;
}

.time-content,
.servings-content {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.time-content strong,
.servings-content strong {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

.time-content span,
.servings-content span {
    font-size: 0.9rem;
}

/* ===== Section Titles (shared) ===== */
.recipe-card .section-title {
    font-size: 1.25rem;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
}

/* ===== Ingredients ===== */
.recipe-ingredients {
    padding: 1.5rem;
}

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

.ingredient-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    line-height: 1.5;
}

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

/* Checkbox styling */
.ingredient-checkbox {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    border: 2px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.ingredient-checkbox::after {
    content: "";
    display: none;
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #333;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.ingredient-text {
    flex: 1;
    font-size: 0.95rem;
}

/* ===== Instructions ===== */
.recipe-instructions {
    padding: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.instructions-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step-counter;
}

.instruction-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
    counter-increment: step-counter;
}

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

.step-number {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
    display: block;
    margin-bottom: 0.25rem;
}

.instruction-text {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== Disclaimer ===== */
.recipe-disclaimer {
    padding: 1.5rem;
    border-top: 1px solid #e0e0e0;
    background: #fafafa;
}

.disclaimer-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nutrition-info,
.allergy-info {
    font-size: 0.85rem;
    line-height: 1.5;
    opacity: 0.8;
}

.nutrition-info h4,
.allergy-info h4 {
    font-size: 0.9rem;
    margin: 0 0 0.25rem;
}

.nutrition-info p,
.allergy-info p {
    margin: 0;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .recipe-meta {
        flex-direction: column;
        align-items: center;
    }
    
    .recipe-time {
        flex-direction: column;
        align-items: center;
    }
    
    .recipe-header {
        padding: 1rem;
    }
    
    .recipe-ingredients,
    .recipe-instructions,
    .recipe-disclaimer {
        padding: 1rem;
    }
    
    .recipe-title {
        font-size: 1.25rem;
    }
}

/* ===== Reset Limoncella list overrides for recipe card ===== */
/* Prevent Limoncella's custom numbered list styling from 
   conflicting with recipe card's own structure */
.recipe-card ol {
    counter-reset: none;
    list-style-type: none;
}

.recipe-card ol li::before {
    content: none;
    display: none;
}

.recipe-card ul {
    margin-left: 0;
    padding-left: 0;
}

.recipe-card ul li {
    list-style-type: none;
}

.recipe-card ul li::marker {
    color: transparent;
}
