body {
    padding-bottom: 20px;
}

/* Admin Manage menu section labels (legacy flat menu; mobile meanmenu) */
.mean-menu-section > span {
    display: block;
    padding: 8px 20px 4px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #888;
    pointer-events: none;
    cursor: default;
}

/* Logo: preserve aspect ratio in narrow header column */
.header-var1 .logo-wrapper img,
.header-main .logo-wrapper img,
.footer-logo-img,
.logo-footer img {
    max-width: 180px;
    width: auto;
    height: auto;
    max-height: 72px;
    object-fit: contain;
}

/* Manage menu: compact two-tier desktop flyout */
@media (min-width: 992px) {
    .manage-nav-item > ul.manage-nav-tier1 {
        min-width: 200px;
        padding: 10px 0;
    }

    .manage-nav-tier1 > li > a {
        padding-top: 8px;
        padding-bottom: 8px;
        white-space: nowrap;
    }

    .manage-nav-group > a {
        position: relative;
        cursor: default;
        padding-right: 28px;
    }

    .manage-nav-group > a::after {
        content: "\203A";
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        font-style: normal;
        font-size: 1.1em;
        opacity: 0.85;
    }

    .manage-nav-tier2 {
        min-width: 220px;
        padding: 8px 0;
    }

    .manage-nav-tier2 li a {
        padding-top: 8px;
        padding-bottom: 8px;
        font-size: 15px;
    }
}

/* X (Twitter) icon — Font Awesome 4 has no fa-x */
.social-icon-x {
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
    font-size: 24px;
}

.social-icon-x svg {
    display: block;
}

.header-social-icons .social-icon-x,
.details-social-icons .social-icon-x {
    font-size: 18px;
}

.widget-get-social .social-icon-x {
    font-size: 24px;
    margin-bottom: 10px;
}

.widget-get-social ul .pinterest {
    background: #bd081c;
}

.widget-get-social ul .reddit {
    background: #ff4500;
}

.widget-get-social ul .youtube {
    background: #cd201f;
}

.widget-get-social ul li .count-type:only-of-type,
.widget-get-social ul li .social-icon-x + .count-type {
    margin-top: 0;
}

/* Wrapping element */
/* Set some basic padding to keep content from hitting the edges */
.body-content {
    padding-left: 15px;
    padding-right: 15px;
}

/* Carousel */
.carousel-caption p {
    font-size: 20px;
    line-height: 1.4;
}

/* Make .svg files in the carousel display properly in older browsers */
.carousel-inner .item img[src$=".svg"] {
    width: 100%;
}

/* QR code generator */
#qrCode {
    margin: 15px;
}

/* Hide/rearrange for smaller screens */
@media screen and (max-width: 767px) {
    /* Hide captions */
    .carousel-caption {
        display: none;
    }
}


td{
    padding:3px 
}

/* Main content spacing after header + always-visible search (no top image banner). */
.recipes-home-body {
    padding-top: 48px;
}

/* Sidebar course quick links — sufficient contrast on green panel */
.recipe-search .category-list ul li a {
    color: #ffffff;
}

/* Advanced search controls — rounded input/select/button styling */
#advance-search .inner-advance-search .form-field input[type="search"],
#advance-search .inner-advance-search .form-field .selectric,
#advance-search .inner-advance-search button[type="submit"] {
    border-radius: 999px;
}

#advance-search .inner-advance-search .form-field input[type="search"] {
    border: 1px solid #d8ddd6;
    padding-inline: 1rem;
    min-height: 44px;
}

#advance-search .inner-advance-search .form-field .selectric {
    border: 1px solid #d8ddd6;
    min-height: 44px;
}

#advance-search .inner-advance-search .form-field .selectric .label {
    line-height: 42px;
}

#advance-search .inner-advance-search button[type="submit"] {
    min-width: 44px;
    min-height: 44px;
}

#advance-search .inner-advance-search .form-field input[type="search"]:focus,
#advance-search .inner-advance-search .form-field .selectric-open .selectric {
    box-shadow: 0 0 0 0.2rem rgba(100, 173, 54, 0.2);
    border-color: #64ad36;
}

/* Recipe listing tiles — 4:3 crop; absolute fill avoids skew from width/height attrs */
.boxed-recipes .recipe-image,
.single-recipe .recipe-image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.boxed-recipes .recipe-image > a,
.single-recipe .recipe-image > a {
    display: block;
    position: absolute;
    inset: 0;
}

.boxed-recipes .recipe-image img.recipe-tile-img,
.boxed-recipes .recipe-image img,
.single-recipe .recipe-image img.recipe-tile-img,
.single-recipe .recipe-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.latest-news-widget .thumb {
    flex-shrink: 0;
    position: relative;
    width: 66px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.latest-news-widget .thumb > a {
    position: absolute;
    inset: 0;
    display: block;
}

.latest-news-widget .thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    display: block;
}

/* Footer banner artwork — marble / culinary hero image.
   Strong selector + !important so bundled main.css .footer-fluid background cannot win in production/CDN edge ordering. */
.footer.footer-fluid.planncook-footer-banner {
    background-color: #1a2e24;
    background-image: url("/images/footer-banner-marble.png") !important;
    background-size: cover !important;
    background-position: center bottom !important;
    background-repeat: no-repeat !important;
}

/* Recipe detail — edit control */
.recipe-edit-link.recipe-edit-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    vertical-align: middle;
}

.recipe-edit-link .fa-pencil-square-o {
    font-size: 1.15em;
    line-height: 1;
}

.recipe-edit-link .recipe-edit-label {
    font-weight: 600;
}

/* Default action buttons — Plan n Cook green */
.btn-default,
.btn-primary {
    color: #fff;
    background-color: #64ad36;
    border: 1px solid #64ad36;
}

.btn-default:hover,
.btn-default:focus,
.btn-primary:hover,
.btn-primary:focus {
    color: #fff;
    background-color: #57962f;
    border-color: #57962f;
}

.btn-default:active,
.btn-default.active,
.btn-primary:active,
.btn-primary.active {
    color: #fff;
    background-color: #4d8529;
    border-color: #4d8529;
}

.btn-default:disabled,
.btn-default.disabled,
.btn-primary:disabled,
.btn-primary.disabled {
    color: #fff;
    background-color: #64ad36;
    border-color: #64ad36;
    opacity: 0.65;
}

/* Identity pages (login/register/resend/manage) */
.auth-card {
    background: #fff;
    border: 1px solid #e7ece4;
    border-radius: 14px;
    padding: 1.25rem 1.25rem 1rem;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
}

.auth-form .form-control {
    border-radius: 12px;
}

.auth-submit-btn {
    border-radius: 12px;
    min-height: 44px;
}

.auth-links p {
    margin-bottom: 0.5rem;
}

.auth-value-panel {
    background: #f4f9f0;
    border: 1px solid #d9e8d0;
    border-radius: 14px;
    padding: 1.5rem 1.5rem 1.25rem;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
    height: 100%;
}

.auth-value-panel__header {
    margin-bottom: 1.25rem;
}

.auth-value-panel__badge {
    display: inline-block;
    background: #64ad36;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.auth-value-panel__title {
    font-size: 1.5rem;
    line-height: 1.25;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.auth-value-panel__lead {
    color: #4b5563;
    margin-bottom: 0;
}

.auth-value-panel__list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.auth-value-panel__list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.65rem;
    color: #374151;
    line-height: 1.45;
}

.auth-value-panel__list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0;
    color: #64ad36;
    font-weight: 700;
}

.auth-value-panel__actions {
    margin-top: auto;
}

.auth-value-cta {
    border-radius: 12px;
    min-height: 44px;
    width: 100%;
}

.auth-value-panel__switch a {
    font-weight: 600;
}

.auth-page-row {
    align-items: stretch;
}

@media (min-width: 992px) {
    .auth-value-cta {
        width: auto;
        min-width: 220px;
    }
}

.manage-shell .manage-content-card {
    background: #fff;
    border: 1px solid #e7ece4;
    border-radius: 14px;
    padding: 1.25rem;
}

.manage-shell .nav-pills .nav-link {
    border-radius: 10px;
}

/* Mobile nav (meanMenu): nested admin links must stay on dark menu, not Bootstrap dropdown panel */
@media screen and (max-width: 991px) {
    .mean-container .mean-nav ul li ul {
        position: static !important;
        float: none !important;
        display: none;
        width: 100% !important;
        background: #0c1923 !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .mean-container .mean-nav ul li ul li a {
        color: #fff !important;
        background: transparent !important;
        text-transform: none;
        opacity: 1;
        filter: none;
    }

    .mean-container .mean-nav ul li ul li a:hover,
    .mean-container .mean-nav ul li ul li a:focus {
        background: rgba(255, 255, 255, 0.1) !important;
        color: #fff !important;
    }
}

/* Recipe card ratings — pan lid icons */
.boxed-recipes .rating-box .icon-svg {
    fill: #6ebe3b;
}

.boxed-recipes .rating-box .icon-container {
    width: 20px;
    height: auto;
    vertical-align: middle;
}

.boxed-recipes .detail h3 .recipe-card-course {
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
    letter-spacing: 0.02em;
}

/* Meal plan cards: exempt masonry collage from absolute 4:3 tile fill */
.boxed-recipes .recipe-image.meal-plan-card-images {
    aspect-ratio: auto;
    min-height: 0;
}

.boxed-recipes .recipe-image.meal-plan-card-images > a {
    position: static;
    inset: auto;
    height: auto;
}

.boxed-recipes .recipe-image.meal-plan-card-images .meal-plan-card-masonry__item img {
    position: static;
    inset: auto;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.meal-plan-card-masonry {
    min-height: 120px;
}

/* Meal plan index cards — masonry collage of recipe images */
.meal-plan-card-images > a {
    display: block;
}

.meal-plan-card-masonry {
    column-count: 2;
    column-gap: 4px;
    line-height: 0;
}

.meal-plan-card-masonry--single {
    column-count: 1;
}

.meal-plan-card-masonry__item {
    break-inside: avoid;
    display: block;
    margin-bottom: 4px;
    overflow: hidden;
}

.meal-plan-card-masonry__item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease-in-out;
}

.boxed-recipes .recipe-single:hover .meal-plan-card-masonry__item img {
    transform: scale(1.08);
}

/* Pantry section (My Kitchen + shopping list) */
.pantry-section .card-header {
    background: #f6faf2;
    border-bottom: 1px solid #e4e9df;
}

.pantry-section-help {
    max-width: 28rem;
}

.pantry-section-list {
    max-height: 11rem;
    overflow-y: auto;
    border: 1px solid #e4e9df;
    border-radius: 8px;
    background: #fcfdfb;
    padding: 0.5rem 0.65rem;
}

.pantry-section-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.pantry-section-items li {
    margin: 0;
}

.pantry-item-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    max-width: 14rem;
    padding: 0.2rem 0.35rem 0.2rem 0.5rem;
    border: 1px solid #d8dfd0;
    border-radius: 999px;
    background: #fff;
    font-size: 0.8rem;
    line-height: 1.3;
}

.pantry-item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pantry-remove-btn {
    border: 0;
    background: transparent;
    color: #9d2b2b;
    font-weight: 700;
    line-height: 1;
    font-size: 1rem;
    padding: 0 0.15rem;
    cursor: pointer;
}

.pantry-common-details summary {
    cursor: pointer;
    user-select: none;
}

.pantry-section .col-md-5 {
    position: relative;
}

.pantry-suggest-list {
    z-index: 20;
    display: none;
    max-height: 12rem;
    overflow-y: auto;
    width: 100%;
}

/* Shopping list page */
.shopping-list-page .shopping-list-toolbar-compact h2 {
    font-family: 'Lato', sans-serif;
    font-weight: 700;
}

.shopping-list-page .shopping-list-item {
    transition: opacity 0.2s ease, background-color 0.2s ease;
    border: 1px solid #e9ecef !important;
}

.shopping-list-page .shopping-list-item.checked .ingredient-name {
    opacity: 0.65;
    text-decoration: line-through;
}

.shopping-list-page .shopping-list-item--hidden {
    display: none !important;
}

.shopping-list-page .shopping-list-item:hover {
    background-color: #f8f9fa;
}

.shopping-list-page .shopping-list-panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.shopping-list-page .shopping-list-item-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    width: 100%;
}

.shopping-list-page .shopping-list-item-row .ingredient-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shopping-list-page .store-section-header {
    border-bottom: 2px solid #e4d9d1;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.2rem;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 1rem;
}

.shopping-list-page .ingredient-recipes-inline {
    font-size: 0.72rem;
    color: #6c757d;
    flex: 0 0 auto;
    max-width: 42%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Shopping list — mobile: denser rows, ingredient reads first */
@media (max-width: 767.98px) {
    .shopping-list-page .shopping-list-panel .card-body {
        padding: 0.65rem 0.5rem;
    }

    .shopping-list-page .store-section-header {
        margin-top: 0.65rem;
        margin-bottom: 0.25rem;
        font-size: 0.9rem;
    }

    .shopping-list-page .shopping-list-item {
        border: none !important;
        border-radius: 0;
        box-shadow: none;
        margin-bottom: 0 !important;
        padding: 0.28rem 0 !important;
        background: transparent;
        border-bottom: 1px solid #eee;
    }

    .shopping-list-page .shopping-list-item:hover {
        background-color: transparent;
    }

    .shopping-list-page .shopping-list-item .form-check {
        gap: 0.35rem !important;
        align-items: flex-start;
    }

    .shopping-list-page .shopping-list-item-row {
        gap: 0.35rem;
        align-items: flex-start;
        line-height: 1.25;
    }

    .shopping-list-page .shopping-list-item-row .ingredient-name {
        font-size: 0.8125rem;
        font-weight: 600;
        white-space: normal;
        overflow: hidden;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        text-overflow: ellipsis;
        flex: 1 1 0;
        min-width: 0;
    }

    .shopping-list-page .ingredient-recipes-inline {
        font-size: 0.625rem;
        line-height: 1.2;
        color: #868e96;
        flex: 0 0 5.25rem;
        max-width: 5.25rem;
        margin-top: 0.1rem;
        text-align: right;
        white-space: nowrap;
    }

    .shopping-list-page .shopping-list-item .form-check-input {
        margin-top: 0.15rem;
    }

    .shopping-list-page .shopping-list-item .btn-link {
        padding-top: 0.1rem !important;
    }
}

/* Meal plan compact cards */
.meal-plan-compact.boxed-recipes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.meal-plan-compact .recipe-single {
    position: relative;
    width: auto;
    max-width: 100%;
    margin-bottom: 0;
}

.meal-plan-compact .recipe-single .recipe-image,
.meal-plan-compact .recipe-single .custom-item-image {
    aspect-ratio: 1 / 1;
    max-height: none;
    overflow: hidden;
}

.meal-plan-compact .recipe-single .recipe-tile-img {
    max-height: none;
    object-fit: cover;
}

.meal-plan-compact .recipe-single .detail {
    padding: 0.4rem 0.5rem;
}

.meal-plan-compact .recipe-single h3 {
    font-size: 0.85rem;
    line-height: 1.2;
    margin-bottom: 0.2rem;
}

.meal-plan-compact .recipe-single .detail h3 a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meal-plan-compact .short-separator,
.meal-plan-compact .rating-box {
    display: none;
}

.meal-plan-compact .meal-info-line {
    font-size: 0.75rem;
    color: #666;
    margin: 0;
}

.meal-plan-compact .meal-plan-edit-btn {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    z-index: 2;
    padding: 0.15rem 0.35rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
}

.meal-plan-compact .recipe-actions {
    display: none;
}

.shopping-list-export-text {
    width: 100%;
    min-height: 12rem;
    resize: vertical;
    font-family: ui-monospace, Consolas, "Courier New", monospace;
    font-size: 0.9rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

@media print {
    .shopping-list-page .no-print {
        display: none !important;
    }

    .shopping-list-page .pantry-section {
        display: none !important;
    }

    .shopping-list-page .shopping-list-item {
        page-break-inside: avoid;
        margin-bottom: 10px;
        border: 1px solid #ddd !important;
        padding: 10px;
    }
}