/* Base styles */
body .container {
    display: flex;
    flex-direction: row;
    max-width: 1400px;
    margin: auto;
    gap: 20px;
}
body .content-area {
    flex: auto;
    padding: 20px;
}
body .sidebar {
    flex: auto;
    padding: 20px;
    background: #f7f7f7;
    border-radius: 8px;
}

/* Recipe sections */
.recipe-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}
.recipe-section-title {
    color: #333;
    border-left: 4px solid #ac1219;
    background-color: #dedede;
    padding-left: 10px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: clamp(1.7rem, 2.5vw, 2rem);
}
.scroll-up-btn {
    color: #ac1219;
    cursor: pointer;
    transform: scale(1.5);
    transform-origin: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    margin-right: 10px;
    padding: 5px;
}
.scroll-up-btn:hover {
    opacity: 0.8;
}

/* Recipe table */
.recipe-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: clamp(14px, 2vw, 16px);
}
.recipe-table th, .recipe-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}
.recipe-table th {
    background-color: #f4f4f4;
}

/* Recipe image */
.recipe-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
    height: auto;
}

/* Recipe lists */
.recipe-ingredient-list {
    list-style-type: disc;
    margin-left: 20px;
    padding-left: 20px;
    font-size: clamp(14px, 2vw, 16px);
}
.recipe-ingredient-list li {
    display: list-item;
    margin-bottom: 5px;
}

/* Time indicators */
.recipe-time-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}
.time-indicator {
    background: #dedede;
    border-radius: 8px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border: 1px solid #eee;
    font-size: clamp(16px, 2vw, 16px);
    flex: 1 1 200px;
}
.time-indicator i {
    margin-right: 8px;
    color: #666;
    font-size: clamp(24px, 2vw, 20px);
}
.ratio-explanation {
    font-size: clamp(12px, 1.5vw, 13px);
    color: #666;
    font-style: italic;
    margin-top: 4px;
}
.prep-cook-ratio {
    flex-basis: 100%;
}

/* Recipe attributes row */
.recipe-attributes {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 15px 0;
    align-items: center;
}

.recipe-attribute {
    display: flex;
    align-items: center;
    background: #dedede;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #eee;
    font-size: clamp(14px, 2vw, 16px);
    flex: 1 1 auto;
    margin-bottom: 10px;
    min-width: 0; /* Allows child elements to be smaller than content */
}

.recipe-attribute i {
    margin-right: 8px;
    color: #666;
    font-size: clamp(16px, 2vw, 20px);
    flex-shrink: 0; /* Prevents the icon from shrinking */
}

.recipe-attribute strong {
    white-space: nowrap; /* Prevents the title from wrapping */
    flex-shrink: 0; /* Prevents the title from shrinking */
    margin-right: 4px; /* Small space after the title */
}

/* Add styles for the content after the title */
.recipe-attribute span, 
.recipe-attribute:not(:has(span)) {
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* Additional styles for difficulty stars to ensure they don't shrink improperly */
.difficulty-stars {
    white-space: nowrap;
    margin: 0 4px;
}

.difficulty-term {
    white-space: nowrap;
}
/* Additional styles for difficulty stars to ensure they don't shrink improperly */
.difficulty-stars {
    white-space: nowrap;
    margin: 0 4px;
    line-height: 1; /* Reduce line height */
    display: inline-flex;
    align-items: center;
    color: #ac1219; /* Red color for stars */
    font-size: clamp(18px, 2.5vw, 24px);
}

.difficulty-term {
    white-space: nowrap;
    line-height: 1; /* Reduce line height */
    display: inline-flex;
    align-items: center;
}

/* Print button */
.print-recipe-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: clamp(12px, 1.5vw, 14px);
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
}
.print-recipe-btn:hover {
    background-color: #ac1219;
}
.print-recipe-btn i {
    margin-right: 8px;
}

/* Instructions list */
.instruction-list {
    list-style-type: decimal;
    margin-left: 20px;
    padding-left: 20px;
    font-size: clamp(14px, 2vw, 16px);
}
.instruction-list li {
    margin-bottom: 12px;
    padding-left: 8px;
}

/* Nutritional information */
.nutritional-info-list {
    list-style-type: none;
    margin: 0;
    padding: 0;
    font-size: clamp(14px, 2vw, 16px);
}
.nutritional-info-list li {
    margin-bottom: 5px;
    display: block;
}

/* Headings */
.content-area h1, 
.recipe-overview h1, 
body .recipe-section h1, 
.site-main article h1 {
    font-size: 2rem !important;
    line-height: 1.2 !important;
}

@media (max-width: 992px) {
    .content-area h1, 
    .recipe-overview h1, 
    body .recipe-section h1, 
    .site-main article h1 {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 576px) {
    .content-area h1, 
    .recipe-overview h1, 
    body .recipe-section h1, 
    .site-main article h1 {
        font-size: 1.35rem !important;
    }
}
h3 {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
}

h4 {
    font-size: clamp(1rem, 2vw, 1.25rem);
}

p {
    font-size: clamp(14px, 2vw, 16px);
}

/* Category Pills */
.recipe-category-pill {
    display: inline-block;
    background-color: #ac1219;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    margin-right: 8px;
    margin-bottom: 8px;
    font-size: clamp(12px, 1.5vw, 14px);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.recipe-category-pill:hover {
    background-color: #8a0e14;
    color: white;
}

/* Tag Links */
.recipe-tag-link {
    display: inline-block;
    color: #333;
    margin-right: 8px;
    text-decoration: underline;
    font-size: clamp(12px, 1.5vw, 14px);
}

.recipe-tag-link:hover {
    color: #ac1219;
}

/* Pin container responsiveness */
.pin-container {
    text-align: center;
    margin: 20px 0;
}
.pin-container img {
    max-width: 100%;
    height: auto;
    max-height: 500px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.pin-button {
    display: inline-block;
    background: #E60023;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: clamp(12px, 1.5vw, 14px);
}

/* TOC Styles */
.recipe-toc-container {
    margin: 20px 0;
    width: 100%;
}

.recipe-toc-toggle button {
    background: transparent;
    border: none;
    text-align: left;
    padding: 10px 15px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.recipe-toc-toggle .dashicons {
    color: #ac1219;
    transform: scale(1.5);
    transform-origin: center;
}

.recipe-toc-toggle button:hover {
    background-color: #f7f7f7;
}

.recipe-toc-toggle button:hover .dashicons {
    opacity: 0.8;
}

.recipe-toc-content {
    border: 1px solid #ddd;
    border-top: none;
    padding: 15px;
    border-radius: 0 0 4px 4px;
}

.recipe-toc-list {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.recipe-toc-list ul {
    list-style-type: none;
    padding-left: 20px;
    margin-top: 8px;
}

.recipe-toc-list li {
    margin-bottom: 8px;
}

.recipe-toc-list a {
    text-decoration: none;
    display: inline-block;
    color: #000;
}

/* Make sure elements have enough top margin for anchor links */
.recipe-section, 
#ingredients-section, 
#instructions-section {
    scroll-margin-top: 60px;
}

/* Add smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Add a subtle highlight effect for the section being navigated to */
@keyframes highlight {
    0% { background-color: transparent; }
    20% { background-color: rgba(255, 255, 0, 0.2); }
    100% { background-color: transparent; }
}

.highlight-section {
    animation: highlight 1.5s ease-out;
}

/* Recipe tools container */
#recipe-tools-container {
    margin: 15px 0;
}

/* Servings Controls - Mobile First Approach */
.servings-control {
    background-color: #dedede;
    border: 1px solid #ddd;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.servings-control-row {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.servings-input-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* Fixed circular buttons */
.servings-btn {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background-color: #4CAF50;
    color: white;
    font-size: 20px;
    line-height: 1;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    padding: 0 !important;
    flex: 0 0 44px !important;
    aspect-ratio: 1/1 !important;
}

.servings-btn:hover {
    background-color: #ac1219;
}

.servings-display {
    font-size: 20px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.servings-original, .btn-reset {
    margin-left: 10px;
}

.btn-reset {
    background-color: #ff9800;
    color: white;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 4px;
    min-height: 44px;
    transition: background-color 0.3s;
}

.btn-reset:hover {
    background-color: #ac1219;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-conversion-table, .btn-shopping-list {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    min-height: 44px;
    width: 100%;
    text-align: center;
    font-size: 12px!important;
    transition: background-color 0.3s;
}

.btn-conversion-table:hover, .btn-shopping-list:hover {
    background-color: #ac1219;
}

.btn-conversion-table {
    background-color: #2196F3;
}

/* Wake Lock */
.wake-lock-container {
    display: flex;
    align-items: center;
    background-color: #f0f0f0;
    padding: 0px;
    border-radius: 4px;
    margin-top: 25px;
}

.wake-lock-label {
    font-weight: bold;
    margin-right: 15px;
}

.wake-lock-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.wake-lock-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.wake-lock-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #FF5722;
    border-radius: 34px;
    transition: .4s;
}

.wake-lock-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
}

.wake-lock-switch input:checked + .wake-lock-slider {
    background-color: #4CAF50;
}

.wake-lock-switch input:checked + .wake-lock-slider:before {
    transform: translateX(26px);
}

.wake-lock-status {
    margin-left: 15px;
    font-weight: bold;
}

/* Conversion Table Modal */
.conversion-table-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 1000;
}

.site-logo-container {
    text-align: center;
    margin: 0 0 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
@media (max-width: 576px) {
  .conversion-tabs {
    flex-wrap: wrap;
    justify-content: space-between;
    border-bottom: none;
  }
  
  .conversion-tab {
    flex: 0 0 48%;
    text-align: center;
    margin-bottom: 8px;
    padding: 8px 5px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 14px !important;
  }
}
/* Reduced logo size */
.modal-logo {
    max-width: 40%;
    height: auto;
}

.conversion-table-content {
    background-color: white;
    margin: 20px auto;
    padding: 20px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 8px;
    position: relative;
}

.conversion-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

/* Fixed tab and close button colors */
.conversion-table-close {
    background: none !important;
    border: none !important;
    font-size: 24px !important;
    cursor: pointer !important;
    color: #333 !important;
    transition: color 0.3s !important;
}

.conversion-table-close:hover {
    color: #ac1219 !important;
}

.conversion-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
}

.conversion-tab {
    padding: 10px 15px !important;
    cursor: pointer !important;
    background: none !important;
    border: none !important;
    font-size: 16px !important;
    transition: color 0.3s !important;
    color: #333 !important; 
}

.conversion-tab:hover {
    color: #ac1219 !important;
}

.conversion-tab.active {
    border-bottom: 2px solid #ac1219 !important;
    font-weight: bold !important;
    color: #ac1219 !important;
}

.conversion-tab-content {
    display: none;
}

.conversion-tab-content.active {
    display: block;
}

.conversion-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.conversion-table th, .conversion-table td {
    padding: 8px;
    text-align: left;
    border: 1px solid #ddd;
}

.conversion-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.conversion-table-footer {
    text-align: right;
    margin-top: 15px;
}

.btn-close-conversion {
    background-color: #2196F3 !important;
    color: white !important;
    border: none !important;
    padding: 8px 15px !important;
    cursor: pointer !important;
    border-radius: 4px !important;
    transition: background-color 0.3s !important;
}

.btn-close-conversion:hover {
    background-color: #ac1219 !important;
}

/* Shopping List Modal */
.shopping-list-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 1000;
}

.shopping-list-content {
    background-color: white;
    margin: 30px auto;
    padding: 20px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 8px;
    position: relative;
}

.shopping-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

/* Add this to your CSS file to fix the shopping list close button color */
.shopping-list-close {
    background: none !important;
    border: none !important;
    font-size: 24px !important;
    cursor: pointer !important;
    color: #333 !important;
    transition: color 0.3s !important;
}

.shopping-list-close:hover {
    color: #ac1219 !important;
}

.btn-print-shopping-list {
    background-color: #2196F3 !important;
    color: white !important;
    border: none !important;
    padding: 8px 15px !important;
    cursor: pointer !important;
    border-radius: 4px !important;
    transition: background-color 0.3s !important;
}

.btn-print-shopping-list:hover {
    background-color: #ac1219 !important;
}

.shopping-list-items {
    padding-left: 20px;
}

.shopping-list-footer {
    margin-top: 20px;
    text-align: right;
}

.btn-print-shopping-list {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn-print-shopping-list:hover {
    background-color: #ac1219;
}

/* Media queries */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        order: 2;
    }
    
    .recipe-attribute {
        flex: 1 1 45%;
    }
    
    .time-indicator {
        flex: 1 1 45%;
    }
    
    .neve-site-logo {
        max-width: 180px !important;
    }
}

@media (max-width: 768px) {
    .content-area, .sidebar {
        padding: 15px;
    }
    
    .recipe-section-title {
        flex-direction: row;
        align-items: center;
        font-size: clamp(1.4rem, 2vw, 1.4rem)!important;
    }
    
    .recipe-attribute {
        flex: 1 1 100%;
    }
    
    .time-indicator {
        flex: 1 1 100%;
    }
    
    .pin-button {
        padding: 8px 16px;
        font-size: clamp(12px, 2vw, 14px);
    }
    
    .servings-control-row {
        flex-direction: column;
        justify-content: flex-start;
    }
    
    .action-buttons {
        margin-top: 15px;
        width: 100%;
    }
    
    .btn-conversion-table, .btn-shopping-list {
        width: 100%;
    }
    
    /* Ensure buttons remain circular */
    .servings-btn {
        width: 44px !important;
        height: 44px !important;
        border-radius: 50% !important;
        aspect-ratio: 1/1 !important;
    }
}

@media (max-width: 576px) {
    .content-area, .sidebar {
        padding: 10px;
    }
    
    .recipe-attributes {
        gap: 10px;
    }
    
    .recipe-section-title {
    flex-direction: row;
    align-items: center;
    font-size: clamp(1.2rem, 2vw, 1.4rem)!important;
    
    }
    .scroll-up-btn {
        transform: scale(1.2);
    }
    
    .recipe-time-indicators {
        gap: 10px;
    }
    
    .pin-container {
        margin: 10px 0;
    }
    
    .neve-site-logo {
        max-width: 150px !important;
    }
}

@media (min-width: 768px) {
    .servings-control-row {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .action-buttons {
        margin-top: 0;
    }
    
    .btn-conversion-table, .btn-shopping-list {
        width: auto;
    }
    
    /* Ensure buttons remain perfectly circular */
    .servings-btn {
        width: 44px !important;
        height: 44px !important;
        border-radius: 50% !important;
        aspect-ratio: 1/1 !important;
    }
}

@media print {
    .sidebar, .site-header, .site-footer, .jump-to-recipe, .print-recipe-btn, .scroll-up-btn,
    .recipe-toc-container, .recipe-tools-container, .wake-lock-container, .servings-control,
    .conversion-table-modal, .shopping-list-modal {
        display: none !important;
    }
    
    .container {
        display: block;
    }
    
    .content-area {
        width: 100%;
        padding: 0;
    }
}

@media (max-width: 992px) {
    body .container,
    .container {
        flex-direction: column !important;
        width: 100% !important;
    }
    
    body .sidebar,
    .sidebar {
        order: 2 !important;
        width: 100% !important;
        flex: none !important;
        margin-top: 20px !important;
    }
    
    body .content-area,
    .content-area {
        width: 100% !important;
        flex: none !important;
    }
}

/* Conversion note styling */
.conversion-note {
    font-style: italic;
    color: #666;
    font-size: 14px;
    margin-top: 10px;
}
/* Set icon color regardless of dark mode */
.dashicons-clock,
.dashicons-groups,
.dashicons-performance {
    color: #ac1219 !important; /* Red color */
}
.recipe-video-container {
  max-width: 320px;
  margin: 0 auto;
}

.portrait-video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 177.78%; /* 16:9 = 56.25%, 9:16 = 177.78% */
  overflow: hidden;
}

.portrait-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.pinterest-save-button {
  text-align: center;
  margin: 15px auto;
}

.pin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #e60023;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.2s;
}

.pin-button:hover {
  background-color: #ad081b;
  color: white;
}

.pin-button .dashicons {
  margin-right: 8px;
}
.rating-share-container {
    display: flex;
    justify-content: space-between;
    align-items: center; /* This helps with vertical alignment */
    width: 100%;
}

.rating-section {
    display: flex;
    align-items: center;
}


/* Mobile responsiveness */
@media (max-width: 768px) {
    .rating-share-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
}
/* ==============================================
   1. BASIC COMMENT STYLING
   ============================================== */
/* Comment containers */
.nv-comments-list li.comment {
    margin-bottom: 20px !important;
    padding-bottom: 20px !important;
}

/* Comment article styling */
.nv-comments-list .nv-comment-article {
    background-color: #DEDEDE !important;
    padding: 15px !important;
    border-radius: 25px !important;
    margin-bottom: 10px !important;
}

/* ==============================================
   2. TEXT AND ICON COLORS
   ============================================== */
/* Text color for comment contents */
.nv-comments-list .nv-comment-article,
.nv-comments-list .nv-comment-article .comment-author,
.nv-comments-list .nv-comment-article .nv-comment-content,
.nv-comments-list .nv-comment-article .comment-author a,
.nv-comments-list .nv-comment-article time,
.nv-comments-list .nv-comment-article .comment-edit-link {
    color: #000 !important;
}

/* Step 1: First apply the red color to all stars and icons */
.star.filled,
.made-it:before,
.recommends:before {
    color: #ac1219 !important;
}

/* Step 2: Then override just the text portions with your desired text color */
.made-it,
.recommends,
.rating-count {
    color: #000 !important; /* Change this to your desired text color */
}

/* Step 3: Force the star color in the recipe attributes section */
.recipe-attribute .rating-stars .star.filled {
    color: #ac1219 !important;
}

/* ==============================================
   3. HR MANAGEMENT & COMMENT THREADING
   ============================================== */
/* Remove ANY horizontal lines between parent comment and replies */
.nv-comments-list li.comment.parent,
.nv-comments-list li.comment.depth-1,
.nv-comments-list .children,
.nv-comments-list .children li:first-child,
.nv-comments-list article {
    border-bottom: none !important;
}

/* Add a horizontal line ONLY after complete comment threads */
.nv-comments-list > li.comment {
    border-bottom: 1px solid #666 !important;
    margin-bottom: 20px !important;
    padding-bottom: 20px !important;
}

/* Remove the line from the very last comment */
.nv-comments-list > li.comment:last-child {
    border-bottom: none !important;
}

/* Also target any actual <hr> elements that might exist */
.nv-comments-list hr,
.nv-comments-list > li > hr,
.nv-comments-list .children hr {
    display: none !important;
}

/* ==============================================
   4. REPLY/CHILD COMMENT STYLING
   ============================================== */
/* Indent and style replies */
.nv-comments-list .children {
    margin-top: 10px !important;
    margin-left: 30px !important;
    padding-left: 15px !important;
    border-left: 3px solid #ac1219 !important;
    list-style-type: none !important;
}

/* Different background for reply comments */
.nv-comments-list .children .nv-comment-article {
    background-color: #E8E8E8 !important;
}

/* Child comment spacing */
.nv-comments-list li.comment .children li.comment {
    margin-top: 15px !important;
    border-bottom: none !important;
}
/* ==============================================
   RESPONSIVE COMMENT LAYOUT FOR MOBILE
   ============================================== */
@media screen and (max-width: 767px) {
    /* Stack author and date vertically */
    .nv-comment-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        margin-bottom: 5px !important; /* Reduced space before stars */
    }
    
    .nv-comment-header .comment-author.vcard {
        display: block !important;
        margin-bottom: 0 !important; /* Further reduce space */
    }
    
    /* Remove the dash after author name on mobile */
    .nv-comment-header .fn.author::after {
        content: "" !important;
    }
    
    /* Date styling */
    .nv-comment-header .comment-author.vcard time {
        display: block !important;
        font-size: 0.85em !important;
        opacity: 0.8 !important;
        margin-top: -3px !important;
    }
    
    /* Bring stars closer to the date */
    .comment-rating-display {
        margin-top: 0 !important;
        margin-bottom: 10px !important;
    }
    
    /* Position comment for edit/reply links */
    .nv-comment-article {
        position: relative !important;
        padding-bottom: 35px !important; /* Make room for reply links */
    }
    
    /* Style edit/reply section to avoid overlap */
    .edit-reply {
        position: absolute !important;
        bottom: 10px !important;
        right: 15px !important;
        background-color: rgba(222, 222, 222, 0.7) !important;
        padding: 3px 8px !important;
        border-radius: 15px !important;
        margin-top: 10px !important;
    }
    
    /* Comment text styling */
    .nv-comment-content p {
        font-size: 16px !important;
        line-height: 1.5 !important;
        word-break: break-word !important; /* Prevent text overflow */
        margin-bottom: 0 !important;
    }
    
    /* Style the reply link */
    .comment-reply-link {
        color: #ac1219 !important;
        font-weight: bold !important;
    }
    
    /* Add spacing between edit and reply links */
    .comment-edit-link {
        margin-right: 8px !important;
    }
    
    /* Adjust avatar position */
    .nv-comment-avatar {
        margin-right: 10px !important;
    }
    
    /* Make stars smaller on mobile */
    .star {
        font-size: 18px !important;
    }
    
    /* Compact rating display */
    .rating-count {
        font-size: 12px !important;
    }
}
/* ==============================================
   FIX ONLY FOR EDIT/REPLY LINKS - ADD THIS
   ============================================== */
/* PUT EDIT/REPLY AT THE ABSOLUTE BOTTOM OF COMMENTS */
@media screen and (max-width: 767px) {
    /* Position the comment to allow for absolute positioning */
    .nv-comments-list .nv-comment-article {
        position: relative !important;
        padding-bottom: 40px !important; /* Make space at bottom */
    }
    
    /* Position edit/reply at the BOTTOM */
    .nv-comments-list .edit-reply {
        position: absolute !important;
        bottom: 8px !important; /* Position at bottom */
        right: 15px !important;
        left: 15px !important; /* Stretch across comment */
        text-align: right !important;
        padding-top: 5px !important;
        border-top: 1px solid #ddd !important; /* Clear visual separator */
        margin: 0 !important;
    }
    
    /* Make sure content doesn't overlap */
    .nv-comments-list .nv-comment-content {
        margin-bottom: 15px !important; /* Space before the links */
    }
}
/* Change capitalization of all comment action text */
.comment-edit-link,
.comment-reply-link,
.comment-reply-login,    /* "LOG IN TO REPLY" specific class */
.must-log-in a,
.comment-respond .logged-in-as a {
    text-transform: capitalize !important; /* Changes to Title Case */
    font-style: italic !important; /* Make text italic */
    font-size: 14px !important; /* Optional: make text size consistent */
    font-weight: normal !important; /* Optional: normalize font weight */
}
/* Styles for thumbs up and chef heart */
.comment-thumbs-up {
    display: inline-flex;
    align-items: center;
    margin-left: 15px;
    cursor: pointer;
    transition: transform 0.2s;
}

.comment-thumbs-up:hover {
    transform: scale(1.1);
}

.comment-thumbs-up.liked {
    opacity: 0.7;
    cursor: default;
}

.comment-thumbs-up .thumbs-icon {
    margin-right: 4px;
    font-size: 16px;
}

.likes-count {
    font-size: 14px;
}

.chef-heart {
    font-size:18px;
    display: inline-block;
    margin-left: 15px;
    color: #ac1219;
    animation: heartbeat 1.5s infinite;
}

.chef-heart-toggle {
    display: inline-block;
    margin-left: 15px;
    font-size: 15px;
    opacity: 0.7;
    cursor: pointer;
    text-decoration: underline;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    5% { transform: scale(1.2); }
    10% { transform: scale(1); }
    15% { transform: scale(1.1); }
    20% { transform: scale(1); }
    100% { transform: scale(1); }
}
/* Mobile Comment Layout Improvements */
@media screen and (max-width: 767px) {
  /* COMPLETELY RESTRUCTURE THE COMMENT LAYOUT */
  
  /* Override the default comment layout */
  .nv-comments-list li.comment,
  .nv-comments-list .nv-comment-article,
  .nv-comments-list .nv-comment-container {
    display: block !important;
    width: 100% !important;
    position: relative !important;
    max-width: 100% !important;
  }
  
  /* Force the avatar out of its container and position absolutely */
  .nv-comments-list .nv-comment-avatar {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important; /* Position on the right */
    margin: 0 !important;
    width: 32px !important; /* Smaller avatar */
    height: 32px !important;
    z-index: 5 !important;
  }
  
  /* Move any flex containers to block display */
  .nv-comments-list .comment-content-container,
  .nv-comments-list .nv-comment-header,
  .nv-comments-list .comment-content-wrapper {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  /* Ensure username appears at the top and gets full width */
  .nv-comments-list .comment-author.vcard {
    display: block !important;
    width: calc(100% - 40px) !important; /* Full width minus avatar space */
    padding-right: 40px !important;
    margin: 0 0 5px 0 !important;
    font-weight: bold !important;
  }
  
  /* Adjust comment metadata position and styling */
  .nv-comments-list .comment-metadata {
    display: block !important;
    clear: both !important;
    margin-bottom: 8px !important;
    font-size: 12px !important;
  }
  
  /* Ensure comment content gets full width and reduced font size */
  .nv-comments-list .nv-comment-content {
    display: block !important;
    width: 100% !important;
    clear: both !important;
    margin-top: 8px !important;
    padding-top: 4px !important;
    font-size: 14px !important; /* Reduced font size */
  }
  
  /* Make sure all text inside comments has reduced font size */
  .nv-comments-list .nv-comment-content p,
  .nv-comments-list .nv-comment-content ul,
  .nv-comments-list .nv-comment-content ol,
  .nv-comments-list .nv-comment-content div {
    font-size: 14px !important; /* Reduced font size */
    line-height: 1.4 !important; /* Adjusted line height */
  }
  
  /* Give full width to the article container and adjust padding */
  .nv-comments-list .nv-comment-article {
    padding: 12px 12px 40px 12px !important;
    margin-bottom: 10px !important;
  }
  
  /* Significantly reduce indentation for reply comments */
  .nv-comments-list .children {
    margin-left: 10px !important; /* Reduced from 30px */
    padding-left: 5px !important; /* Reduced from 15px */
    border-left: 2px solid #ac1219 !important; /* Thinner line */
  }
  
  /* Further reduce indentation for deeply nested replies */
  .nv-comments-list .children .children {
    margin-left: 5px !important;
    padding-left: 5px !important;
  }
  
  /* Force rating elements to appear below author */
  .comment-rating-display,
  .recommends,
  .made-it {
    display: block !important;
    margin-top: 5px !important;
    margin-bottom: 5px !important;
  }
  
  /* Adjust spacing for likes and hearts */
  .comment-thumbs-up, 
  .chef-heart-toggle, 
  .chef-heart {
    margin-left: 5px !important;
    display: inline-block !important;
  }
  
  /* Position the reply/edit links at the bottom */
  .nv-comments-list .edit-reply {
    position: absolute !important;
    bottom: 8px !important;
    right: 12px !important;
    left: auto !important;
    padding: 3px 8px !important;
    text-align: right !important;
  }
  
  /* Make sure edit date is positioned correctly */
  .nv-comments-list .comment-edit-link,
  .nv-comments-list .comment-reply-link {
    display: inline-block !important;
    margin: 0 5px !important;
  }
  
  /* Date/timestamp styling */
  .nv-comments-list time {
    display: block !important;
    font-size: 12px !important;
    color: #666 !important;
    margin-bottom: 5px !important;
  }
}
.nv-content-wrap {
    --listpad: 0px;}
.image-policy-caption {
    text-align: center;
    font-size: 0.9em;
    margin: 10px 0 20px 0;
    color: #666;
}

.image-policy-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
    color: #888;
}    
.recipe-image-container {
    text-align: center;
    margin: 20px 0;
}

.recipe-image {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

.image-policy-caption {
    text-align: center;
    font-size: 0.85em;
    margin: 8px 0 0 0;
    color: #666;
    font-style: italic;
}

.image-policy-caption a {
    color: #ac1219;
    text-decoration: none;
}

.image-policy-caption a:hover {
    text-decoration: underline;
}

/* Reset text alignment for the image policy section */
.image-policy-section {
    text-align: left; /* Override any inherited centering */
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.image-policy-section h4 {
    text-align: left;
}

.image-policy-content p {
    text-align: left;
}