/* Recipe Display Plugin Styles */

.recipe-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    direction: rtl;
    text-align: right;
}

/* Logo for print - hidden on screen */
.recipe-print-logo {
    display: none;
}

/* Kosher Color Themes */
.recipe-container.kosher-meat {
    --recipe-color: #E53935;
    border-right: 4px solid #E53935;
}

.recipe-container.kosher-dairy {
    --recipe-color: #1E88E5;
    border-right: 4px solid #1E88E5;
}

.recipe-container.kosher-parve {
    --recipe-color: #424242;
    border-right: 4px solid #424242;
}

/* Recipe Header */
.recipe-header {
    padding: 0;
    border-bottom: 1px solid #e0e0e0;
}

/* Recipe Meta Information */
.recipe-meta {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0;
}

.recipe-meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    padding: 20px 25px;
    flex: 1;
    min-width: 0;
    border-left: 1px solid #d0d0d0;
}

.recipe-meta-item:first-child {
    border-right: 1px solid #d0d0d0;
}

.recipe-meta-item:last-child {
    border-left: none;
}

.recipe-icon {
    font-size: 32px;
    filter: none;
    opacity: 1;
    line-height: 1;
}

.kosher-meat .recipe-icon {
    filter: none;
    opacity: 1;
}

.kosher-dairy .recipe-icon {
    filter: none;
    opacity: 1;
}

.kosher-parve .recipe-icon {
    filter: none;
    opacity: 1;
}

.recipe-meta-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--recipe-color);
    white-space: nowrap;
}

.meta-value {
    font-size: 17px;
    font-weight: 500;
    color: #000;
    white-space: nowrap;
}

.kosher-highlight {
    color: var(--recipe-color) !important;
    font-weight: 700 !important;
}

/* Recipe Content */
.recipe-content {
    padding: 30px;
}

.recipe-section {
    margin-bottom: 35px;
}

.recipe-section:last-child {
    margin-bottom: 0;
}

.section-title {
    margin: 0 0 20px 0;
    padding: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
    color: #000;
    border-bottom: 2px solid var(--recipe-color);
}

/* Ingredients List */
.ingredients-list {
    margin: 0;
    padding: 0;
}

.ingredient-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid #e8e8e8;
}

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

.ingredient-checkbox {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.ingredient-item label {
    margin: 0;
    padding: 0;
    font-size: 18px;
    font-weight: 400;
    color: #000;
    cursor: pointer;
    flex: 1;
    line-height: 1.7;
}

.ingredient-item input[type="checkbox"]:checked + label {
    text-decoration: line-through;
    opacity: 0.5;
}

.reset-ingredients-btn {
    margin-top: 15px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reset-ingredients-btn:hover {
    background: #e8e8e8;
    color: #333;
}

/* Instructions List */
.instructions-list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: instruction-counter;
}

.instructions-list li {
    position: relative;
    margin: 0 0 30px 0;
    padding: 0;
    font-size: 17px;
    font-weight: 400;
    color: #000;
    line-height: 1.7;
    counter-increment: instruction-counter;
}

.instructions-list li:last-child {
    margin-bottom: 0;
}

.instructions-list li::before {
    content: '0' counter(instruction-counter);
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--recipe-color);
    margin-bottom: 8px;
    line-height: 1;
}

/* Tips Section */
.tips-section {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
    border-right: 3px solid var(--recipe-color);
}

.tips-section .section-title {
    border-bottom: none;
    margin-bottom: 10px;
    font-size: 20px;
}

.recipe-tips {
    margin: 0;
    padding: 0;
    font-size: 15px;
    font-weight: 400;
    color: #333;
    line-height: 1.7;
}

/* Recipe Actions */
.recipe-actions {
    padding: 20px 30px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.print-recipe-btn {
    padding: 12px 30px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: var(--recipe-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.print-recipe-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Print Styles */
@media print {
    /* Hide everything on page except recipe */
    body > *:not(.recipe-container) {
        display: none !important;
    }
    
    /* Show recipe */
    .recipe-container {
        display: block !important;
        max-width: 100%;
        border: none;
        box-shadow: none;
        margin: 0;
        padding: 20px;
    }
    
    /* Show logo in print */
    .recipe-print-logo {
        display: block !important;
        text-align: center;
        margin-bottom: 30px;
        padding-bottom: 20px;
        border-bottom: 2px solid #333;
    }
    
    .recipe-print-logo img {
        max-width: 200px;
        height: auto;
    }
    
    .recipe-print-logo h1 {
        margin: 0;
        font-size: 28px;
        color: #333;
    }
    
    /* Hide buttons */
    .print-recipe-btn,
    .reset-ingredients-btn {
        display: none !important;
    }
    
    /* Hide checkboxes */
    .ingredient-checkbox {
        display: none !important;
    }
    
    .ingredient-item label {
        padding-right: 0;
    }
    
    /* Ensure proper page breaks */
    .recipe-section {
        page-break-inside: avoid;
    }
    
    .instructions-list li {
        page-break-inside: avoid;
    }
    
    /* Remove colored borders for printing */
    .recipe-container {
        border-right: none !important;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .recipe-container {
        margin: 20px 15px;
        border-radius: 6px;
    }
    
    .recipe-header {
        padding: 20px 20px 15px;
    }
    
    .recipe-title {
        font-size: 26px;
        margin-bottom: 20px;
    }
    
    .recipe-meta {
        gap: 15px;
    }
    
    .recipe-meta-item {
        flex: 1 1 calc(50% - 15px);
        min-width: 140px;
    }
    
    .recipe-content {
        padding: 20px;
    }
    
    .section-title {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .instructions-list li {
        margin-bottom: 25px;
        font-size: 16px;
    }
    
    .instructions-list li::before {
        font-size: 28px;
        margin-bottom: 6px;
    }
    
    .recipe-actions {
        padding: 15px 20px;
    }
}

@media (max-width: 480px) {
    .recipe-title {
        font-size: 22px;
    }
    
    .recipe-meta-item {
        flex: 1 1 100%;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .ingredient-item label,
    .instructions-list li {
        font-size: 14px;
    }
}
