/* Custom styles for rich text content in recipes */

/* Recipe description rich text styles */
.recipe-content [itemprop="description"] {
    line-height: 1.6;
    margin-bottom: 20px;
}

.recipe-content [itemprop="description"] h1,
.recipe-content [itemprop="description"] h2,
.recipe-content [itemprop="description"] h3,
.recipe-content [itemprop="description"] h4,
.recipe-content [itemprop="description"] h5,
.recipe-content [itemprop="description"] h6 {
    color: #606060;
    font-weight: 500;
    margin: 15px 0 10px 0;
}

.recipe-content [itemprop="description"] h1 { font-size: 24px; }
.recipe-content [itemprop="description"] h2 { font-size: 20px; }
.recipe-content [itemprop="description"] h3 { font-size: 18px; }
.recipe-content [itemprop="description"] h4 { font-size: 16px; }
.recipe-content [itemprop="description"] h5 { font-size: 14px; }
.recipe-content [itemprop="description"] h6 { font-size: 12px; }

.recipe-content [itemprop="description"] p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.recipe-content [itemprop="description"] ul,
.recipe-content [itemprop="description"] ol {
    margin: 10px 0 15px 20px;
}

.recipe-content [itemprop="description"] li {
    margin-bottom: 5px;
    line-height: 1.5;
}

.recipe-content [itemprop="description"] strong,
.recipe-content [itemprop="description"] b {
    font-weight: 600;
    color: #707070;
}

.recipe-content [itemprop="description"] em,
.recipe-content [itemprop="description"] i {
    font-style: italic;
}

.recipe-content [itemprop="description"] table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.recipe-content [itemprop="description"] table td,
.recipe-content [itemprop="description"] table th {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.recipe-content [itemprop="description"] table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

/* Ingredients and Directions - keeping original styling for plain text */
.ingredients, .directions {
    background-color: #fff;
    border: 1px solid #e9e9e9;
    padding: 20px;
    position: relative;
    margin: 12px 0 35px;
    border-radius: 5px;
}

/* Print styles for rich text content */
@media print {
    .recipe-content [itemprop="description"] {
        page-break-after: avoid;
    }
    
    .recipe-content [itemprop="description"] h1,
    .recipe-content [itemprop="description"] h2,
    .recipe-content [itemprop="description"] h3,
    .recipe-content [itemprop="description"] h4,
    .recipe-content [itemprop="description"] h5,
    .recipe-content [itemprop="description"] h6 {
        page-break-after: avoid;
    }
    
    .recipe-content [itemprop="description"] ul,
    .recipe-content [itemprop="description"] ol {
        page-break-inside: avoid;
    }
}

/* FAQ Section Styles */
.faq-section {
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid #e9e9e9;
}

.faq-section h3 {
    color: #606060;
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 500;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background: #fff;
    border: 1px solid #e9e9e9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.faq-question {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e9e9e9;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-question h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.faq-answer {
    padding: 15px 20px;
    background: #fff;
    line-height: 1.6;
    color: #555;
}

.faq-answer p {
    margin: 0 0 10px 0;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* Admin FAQ Form Styles */
.faq-item {
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f9f9f9;
}

.faq-item .row {
    align-items: flex-start;
}

.faq-item input[type="text"],
.faq-item textarea {
    margin-bottom: 0;
}

.remove-faq {
    margin-top: 5px;
}

 /* Print styles for FAQ */
 @media print {
     .faq-section {
         border-top: 1px solid #ccc;
         margin: 20px 0;
     }
     
     .faq-item {
         border: 1px solid #ccc;
         margin-bottom: 10px;
         page-break-inside: avoid;
     }
     
     .faq-question {
         background: #f5f5f5;
     }
 }
 
 /* Content Badge Styles */
 .subscription-badge {
     background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
     color: #333;
     padding: 4px 12px;
     border-radius: 20px;
     font-size: 0.85em;
     font-weight: 600;
     display: inline-flex;
     align-items: center;
     gap: 5px;
     box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
     animation: pulse-gold 2s infinite;
 }
 
 .free-content-badge {
     background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
     color: #fff;
     padding: 4px 12px;
     border-radius: 20px;
     font-size: 0.85em;
     font-weight: 600;
     display: inline-flex;
     align-items: center;
     gap: 5px;
     box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
     animation: pulse-green 2s infinite;
 }
 
 .subscription-badge i {
     font-size: 0.9em;
 }
 
 @keyframes pulse-gold {
     0% {
         box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
     }
     50% {
         box-shadow: 0 4px 16px rgba(255, 215, 0, 0.5);
     }
     100% {
         box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
     }
 }
 
 @keyframes pulse-green {
     0% {
         box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
     }
     50% {
         box-shadow: 0 4px 16px rgba(40, 167, 69, 0.5);
     }
     100% {
         box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
     }
 }
 
 .recipe-content {
     position: relative;
 }
 
 .recipe-content.premium-content::before {
     content: '';
     position: absolute;
     top: 0;
     left: 0;
     right: 0;
     height: 3px;
     background: linear-gradient(90deg, #FFD700, #FFA500, #FFD700);
     background-size: 200% 100%;
     animation: shimmer 3s ease-in-out infinite;
 }
 
 .recipe-content.free-content::before {
     content: '';
     position: absolute;
     top: 0;
     left: 0;
     right: 0;
     height: 3px;
     background: linear-gradient(90deg, #28a745, #20c997, #28a745);
     background-size: 200% 100%;
     animation: shimmer-green 3s ease-in-out infinite;
 }
 
 @keyframes shimmer {
     0% {
         background-position: -200% 0;
     }
     100% {
         background-position: 200% 0;
     }
 }
 
 @keyframes shimmer-green {
     0% {
         background-position: -200% 0;
     }
     100% {
         background-position: 200% 0;
     }
 }
 
 /* Subscription notice for non-subscribers */
 .subscription-notice {
     background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
     border: 2px solid #FFD700;
     border-radius: 12px;
     padding: 20px;
     margin: 20px 0;
     text-align: center;
     position: relative;
     overflow: hidden;
 }
 
 .subscription-notice::before {
     content: '';
     position: absolute;
     top: -50%;
     left: -50%;
     width: 200%;
     height: 200%;
     background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.1), transparent);
     animation: shine 3s infinite;
 }
 
 @keyframes shine {
     0% {
         transform: translateX(-100%) translateY(-100%) rotate(45deg);
     }
     100% {
         transform: translateX(100%) translateY(100%) rotate(45deg);
     }
 }
 
 .subscription-notice h3 {
     color: #333;
     margin-bottom: 10px;
     font-size: 1.3em;
     font-weight: 600;
 }
 
 .subscription-notice p {
     color: #666;
     margin-bottom: 15px;
     line-height: 1.5;
 }
 
 .subscription-notice .btn-subscribe {
     background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
     color: #333;
     border: none;
     padding: 12px 24px;
     border-radius: 25px;
     font-weight: 600;
     text-decoration: none;
     display: inline-block;
     transition: all 0.3s ease;
     box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
 }
 
 .subscription-notice .btn-subscribe:hover {
     transform: translateY(-2px);
     box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
     color: #333;
     text-decoration: none;
 }
 
 /* Free content notice for free recipes */
 .free-content-notice {
     background: linear-gradient(135deg, #f8fff9 0%, #e8f5e8 100%);
     border: 2px solid #28a745;
     border-radius: 12px;
     padding: 20px;
     margin: 20px 0;
     text-align: center;
     position: relative;
     overflow: hidden;
 }
 
 .free-content-notice::before {
     content: '';
     position: absolute;
     top: -50%;
     left: -50%;
     width: 200%;
     height: 200%;
     background: linear-gradient(45deg, transparent, rgba(40, 167, 69, 0.1), transparent);
     animation: shine-green 3s infinite;
 }
 
 @keyframes shine-green {
     0% {
         transform: translateX(-100%) translateY(-100%) rotate(45deg);
     }
     100% {
         transform: translateX(100%) translateY(100%) rotate(45deg);
     }
 }
 
 .free-content-notice h3 {
     color: #28a745;
     margin-bottom: 10px;
     font-size: 1.3em;
     font-weight: 600;
 }
 
 .free-content-notice p {
     color: #666;
     margin-bottom: 15px;
     line-height: 1.5;
 }
 
 .free-content-notice .btn-explore {
     background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
     color: #fff;
     border: none;
     padding: 12px 24px;
     border-radius: 25px;
     font-weight: 600;
     text-decoration: none;
     display: inline-block;
     transition: all 0.3s ease;
     box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
 }
 
 .free-content-notice .btn-explore:hover {
     transform: translateY(-2px);
     box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
     color: #fff;
     text-decoration: none;
 }
 
 /* WebP Upload Support Styles */
 .webp-support-notice {
     background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
     border: 2px solid #2196f3;
     border-radius: 8px;
     padding: 15px;
     margin: 10px 0;
     position: relative;
     overflow: hidden;
 }
 
 .webp-support-notice::before {
     content: '';
     position: absolute;
     top: -50%;
     left: -50%;
     width: 200%;
     height: 200%;
     background: linear-gradient(45deg, transparent, rgba(33, 150, 243, 0.1), transparent);
     animation: shine-blue 3s infinite;
 }
 
 @keyframes shine-blue {
     0% {
         transform: translateX(-100%) translateY(-100%) rotate(45deg);
     }
     100% {
         transform: translateX(100%) translateY(100%) rotate(45deg);
     }
 }
 
 .webp-support-notice h4 {
     color: #1976d2;
     margin-bottom: 8px;
     font-size: 1.1em;
     font-weight: 600;
 }
 
 .webp-support-notice p {
     color: #424242;
     margin: 0;
     font-size: 0.95em;
     line-height: 1.4;
 }
 
 .webp-badge {
     background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
     color: #fff;
     padding: 3px 8px;
     border-radius: 12px;
     font-size: 0.75em;
     font-weight: 600;
     display: inline-block;
     margin-left: 8px;
     animation: pulse-blue 2s infinite;
 }
 
 @keyframes pulse-blue {
     0% {
         box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
     }
     50% {
         box-shadow: 0 4px 12px rgba(33, 150, 243, 0.5);
     }
     100% {
         box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
     }
 }
