/* Using system fonts instead of Muli */
h1,
h2,
h3 {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: bold;
}

p {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 18px;
    color: #555;
}

.button {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: bold;
    text-transform: uppercase;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
    margin: 0;
    padding: 0;
}

/* Visibility helpers for desktop vs mobile variants */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

/* Header Styling */
.base-header {
    background-color: #ffffff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    height: 60px;
    /* Fixed height for consistency */
}

.base-burger-menu {
    font-size: 24px;
    cursor: pointer;
    display: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.3s;
    margin-right: 5px;
}

.base-burger-menu:hover,
.base-burger-menu:active {
    background-color: rgba(0, 0, 0, 0.1);
}

.base-headerlogo a {
    color: blue;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
    padding-left: 10px;
}

.base-nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-grow: .2;
}

.base-logout-btn {
    background: #444;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.base-logout-btn:hover {
    background: #555;
}

.base-search-container {
    display: flex;
    align-items: center;
    border: 2px solid #007bff;
    border-radius: 25px;
    overflow: hidden;
    background-color: #fff;
    width: 300px;
    max-height: 35px;
}

.base-nav-links a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    background: #444;
    border-radius: 15px;
    font-size: 16px;
    transition: background 0.3s;
}

.base-nav-links a:hover {
    background: #555;
}

.base-search-form input {
    flex: 1;
    padding: 14px;
    width: 300px;
    max-width: 500px;
    flex-grow: 1;
    border: none;
    font-size: 16px;
    transition: width 0.3s ease;
}

.base-search-form button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 10px;
    color: #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.base-search-form button:hover {
    background: #6e6e6e;
}

/* Default Header */
.home-start-header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    transition: background-color 0.3s ease-in-out;
    z-index: 1000;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    height: 60px;
    /* Fixed height for consistency */
    box-sizing: border-box;
}

/* Light Header When Scrolled (Only on Home Page) */
.home-start-header.scrolled {
    background-color: rgba(255, 255, 255, 0.9) !important;
    color: black !important;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1) !important;
}

/* Responsive Burger Menu */
@media (max-width: 768px) {

    /* Mobile placeholder text differs: encourage selecting instead of dropping */
    .schedule-dropzone:empty::after {
        content: "Selecione sua receita";
    }

    /* Swap visibility on small screens */
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    .base-burger-menu {
        display: flex;
        margin-right: 0;
    }

    .base-headerlogo a {
        font-size: 20px;
        padding-left: 5px;
    }

    .base-nav-links {
        display: none;
        flex-direction: column;
        background: #333;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        padding: 15px;
        border-bottom: 1px solid #444;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
        z-index: 999;
        gap: 12px;
        align-items: stretch;
        box-sizing: border-box;
    }

    .base-nav-links.show {
        display: flex;
        animation: fadeIn 0.3s ease-in-out;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .base-search-container {
        width: 100%;
        margin: 5px 0;
    }

    .base-nav-links a {
        width: 100%;
        text-align: center;
        padding: 12px;
        box-sizing: border-box;
    }

    .base-logout-btn {
        width: 100%;
        padding: 12px;
        border-radius: 8px;
        margin-top: 5px;
    }

    /* Fix home header for mobile */
    .home-start-header {
        padding: 10px 15px;
        height: 60px;
    }
}

/* General mobile optimizations */
@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    main {
        padding-top: 0;
        /* We're using JavaScript to set this dynamically */
    }

    h1 {
        font-size: 26px;
    }

    h2 {
        font-size: 22px;
    }

    h3 {
        font-size: 18px;
    }

    p {
        font-size: 16px;
    }

    /* Improved footer for mobile */
    footer {
        text-align: center;
        padding: 15px;
        margin-top: 30px;
    }

    /* Improved how-it-works section for mobile */
    .home-how-it-works {
        padding: 30px 15px;
    }

    .home-container,
    .home-reverse {
        flex-direction: column !important;
        text-align: center;
        padding: 25px 0;
        gap: 20px;
    }

    .home-step1-text,
    .home-step3-text,
    .home-step2-text,
    .home-step4-text {
        text-align: center;
        width: 100%;
        order: 2;
        /* Text below image */
        padding: 0 15px;
    }

    .home-step1-image,
    .home-step2-image,
    .home-step3-image,
    .home-step4-image {
        width: 100%;
        order: 1;
        /* Image above text */
    }

    .home-step1-text h2,
    .home-step2-text h2,
    .home-step3-text h2,
    .home-step4-text h2 {
        font-size: 20px;
        margin-top: 10px;
    }

    .home-step1-image img,
    .home-step2-image img,
    .home-step3-image img,
    .home-step4-image img {
        max-width: 100%;
        border-radius: 8px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .base-header {
        padding: 10px 12px;
    }

    .base-headerlogo a {
        font-size: 18px;
        padding-left: 0;
    }

    main {
        margin-bottom: 30px;
    }

    .home-how-it-works {
        padding: 20px 10px;
    }

    .home-container,
    .home-reverse {
        padding: 15px 0;
    }

    /* Make scrolled header more visible on mobile */
    .home-start-header.scrolled {
        background-color: rgba(255, 255, 255, 0.95) !important;
    }
}

.recipe-header_menu-top {
    display: grid;
    grid-template-columns: 100px 150px 1fr 200px;
    height: 70px;
    align-items: center;
    z-index: 1000;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    padding: 0px;
    width: 100%;
    top: 0;
    left: 0;
    height: 70px;
    background-color: white;
    box-sizing: border-box;
}

.recipe-header_menu-button-container,
.recipe-header_logo-wrapper,
.recipe-header_utility-nav,
.recipe-header_login {
    display: flex;
}

.recipe-header_menu-button-container {
    justify-content: end;
}

.recipe-header_login {
    display: flex;
    align-items: center;
    font-size: 16px;
}

.recipe-header_logo-wrapper {
    color: blue;
    font-size: 20px;
}

.recipe-header_utility-nav {
    min-width: 200px;
    align-items: center;
    justify-content: center;
}

.recipe-header_utility-search-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    max-width: 400px;
    border: 1px solid #ddd;
    border-radius: 25px;
    overflow: hidden;
    background-color: #fff;
}

.recipe-header_utility-search-input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    outline: none;
    font-size: 16px;
}

.recipe-header_utility-search-button {
    padding: 10px 20px;
    border: none;
    background-color: #ff6600;
    color: white;
    cursor: pointer;
    font-size: 16px;
}

.search-button:hover {
    background-color: #ff4500;
}


.hamburger-menu {
    width: 100%;
    max-width: 40px;
    height: auto;
    display: block;
    margin-right: 15px;
}

.header-buttom_login {
    width: 100%;
    max-width: 24px;
    height: auto;
    display: block;
    margin-left: 3px;
    padding: 3px;
    font-size: 10px;
}

.recipe-mainbody-container {
    display: grid;
    grid-template-columns: 2fr 11fr 5fr;
    padding-top: 80px;
    background-color: #def1f1;
}

.recipe-recipebody-container {
    display: grid;
    max-width: 1000px;
}

.recipe-recipebody-img {
    height: auto;
    width: 100%;
}

.recipe-recipebody-card-container {
    /*border: 1px solid rgb(24, 21, 20);*/
    background-color: white;
}

.recipe-recipebody-cardinfo-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}

.recipe-recipebody-cardinfo-cookingtimetop,
.recipe-recipebody-cardinfo-servingstop,
.recipe-recipebody-cardinfo-caloriestop {
    background-color: #fdd0b4;
    color: white;
    padding: 10px 0px 10px 0px;
    text-align: center;
    border: 2px solid white;
}

.recipe-recipebody-cardinfo-cookingtimebottom,
.recipe-recipebody-cardinfo-servingsbottom,
.recipe-recipebody-cardinfo-caloriesbottom {
    text-align: center;
    font-size: 25px;
    padding: 12px 0px 12px 0px;
}

.recipe-recipebody-ingredients {
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    margin: 20px 0;
    padding: 0;
    list-style: none;
}

.recipe-recipebody-ingredients li {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    color: #333;
}

.recipe-recipebody-ingredients li:hover {
    background-color: #f0f0f0;
}


.recipe-recipebody-steps-container {
    list-style: none;
    padding: 0;
    counter-reset: step-counter;

}

.recipe-recipebody-step {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.recipe-recipebody-step::before {
    counter-increment: step-counter;
    content: "Step " counter(step-counter) ": ";
    font-weight: bold;
    color: #007bff;
    font-size: 1.2rem;
    margin-right: 10px;
}

.recipe-recipebody-step-image {
    width: 100px;
    height: 100px;
    border-radius: 5px;
    margin-right: 20px;
    object-fit: cover;
    border: 2px solid #ddd;
}

.recipe-recipebody-step-content {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.6;
}

.recipe-recipebody-no-steps {
    font-style: italic;
    color: #999;
    text-align: center;
}

.home-header_menu {
    display: grid;
    grid-template-columns: 50px 300px 1fr 100px 100px;
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    background-color: #def1f1E6;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    z-index: 1000;
    text-align: center;
    align-items: center;
    max-height: 80px;
    box-sizing: border-box;
}

.home-hero_container {
    position: relative;
    width: 100%;
    max-height: 500px;
    overflow: hidden;
}

.home-hero_img {
    width: 100%;
    height: auto;
    display: block;
}

.home-header_humburger-menu,
.home-header_logo,
.home-header_nav-menu,
.home-header_sign_up,
.home-header_log_in {
    display: flex;
}

/* ✅ Overlay Styles */
.home-hero_overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.75);
    padding: 25px;
    border-radius: 12px;
    width: 80%;
    max-width: 500px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* ✅ Text Styles */
.home-hero_title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 15px;
    color: white;
}

.home-hero_subtitle {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 25px;
    color: #FFFFFF;
    text-shadow: 0px 0px 3px #000000, 0px 0px 5px #000000;
}

/* ✅ Button Styles */
.home-hero_btn {
    display: inline-block;
    font-size: 18px;
    font-weight: bold;
    padding: 14px 30px;
    background: #ff7f50;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.home-hero_btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.home-hero_btn:hover {
    background: #ff5722;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.home-hero_btn:hover:before {
    left: 100%;
}

.home-hero_btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Home-btn (CTA in the How it Works section) */
.home-btn {
    display: inline-block;
    padding: 14px 30px;
    background-color: #c91f1f;
    color: white;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    text-decoration: none;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(201, 31, 31, 0.3);
    position: relative;
    overflow: hidden;
    border: none;
}

.home-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.home-btn:hover {
    background-color: #a81717;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(168, 23, 23, 0.4);
}

.home-btn:hover:before {
    left: 100%;
}

.home-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(168, 23, 23, 0.3);
}

/* Mobile responsive CTA */
@media (max-width: 768px) {
    .home-hero_container {
        height: 60vh;
        min-height: 300px;
    }

    .home-hero_img {
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    /* Recipe header mobile adjustments */
    .recipe-header_menu-top {
        grid-template-columns: auto 1fr auto;
        padding: 0 10px;
        height: 60px;
    }

    .recipe-header_logo-wrapper {
        font-size: 18px;
    }

    .recipe-header_utility-nav {
        min-width: auto;
    }

    .home-hero_overlay {
        width: 85%;
        padding: 20px;
    }

    .home-hero_title {
        font-size: 26px;
        margin-bottom: 10px;
    }

    .home-hero_subtitle {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .home-hero_btn {
        display: block;
        width: 85%;
        margin: 0 auto;
        padding: 12px 20px;
        font-size: 16px;
    }

    .home-btn {
        display: block;
        width: 85%;
        margin: 20px auto 0;
        padding: 12px 20px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .home-hero_container {
        height: 50vh;
    }

    .home-hero_overlay {
        width: 90%;
        padding: 15px;
    }

    .home-hero_title {
        font-size: 22px;
    }

    .home-hero_subtitle {
        font-size: 14px;
    }

    .home-hero_btn,
    .home-btn {
        width: 100%;
        padding: 10px 15px;
    }

    /* Home header menu mobile adjustments */
    .home-header_menu {
        grid-template-columns: 40px auto 1fr 80px 80px;
        width: 95%;
        padding: 8px;
    }
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #007bff;
    /* Blue border */
    border-radius: 25px;
    /* Round edges for the bar */
    outline: none;
    font-size: 16px;
    color: #333;
    transition: border-color 0.3s ease;
}

/* Focus effect on the input */
.search-input:focus {
    border-color: #0056b3;
    /* Darker blue */
}

/* Button styling */
.search-button {
    position: absolute;
    right: 10px;
    /* Align button to the right */
    background-color: #007bff;
    /* Blue circle */
    border: none;
    border-radius: 50%;
    /* Make it circular */
    width: 40px;
    /* Circle width */
    height: 40px;
    /* Circle height */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Optional shadow */
    transition: background-color 0.3s ease;
}

/* Hover effect for the button */
.search-button:hover {
    background-color: #0056b3;
    /* Darker blue */
}

/* Icon styling */
.search-icon {
    width: 20px;
    /* Icon size */
    height: 20px;
}

.home-header_sign_up,
.btn-signup {
    text-decoration: none;
    font-size: 16px;
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    background-color: #28a745;
    color: white;
    transition: background-color 0.3s ease;
    cursor: pointer;
    max-height: 40px;
}

.home-header_sign_up,
.btn-signup:hover {
    background-color: #218838;
}

.home-header_log_in,
.btn-login {
    text-decoration: none;
    font-size: 16px;
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    background-color: #007bff;
    color: white;
    transition: background-color 0.3s ease;
    cursor: pointer;
    max-height: 40px;
}

.home-header_log_in,
.btn-login:hover {
    background-color: #0056b3;
}

.home-recipe-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 300px));
    gap: 20px;
    justify-content: center;
    padding: 20px;
    margin: 0 auto;
    max-width: 1280px;
    /* This allows 4 x 300px cards plus gaps */
    background-color: #def1f1E6;
}

.home-recipe {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    display: grid;
    grid-template-rows: auto auto;
    background-color: white;
    height: 100%;
}

.home-recipe:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.home-recipe:active {
    transform: translateY(0);
}

.home-recipe-photo {
    overflow: hidden;
    height: 220px;
    position: relative;
}

.home-recipe-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.home-recipe:hover .home-recipe-photo img {
    transform: scale(1.05);
}

.home-recipe-title {
    padding: 16px;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 60px;
}

.home-recipe-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 600;
}

.home-recipe-title a:hover {
    color: #007bff;
}

.home-recipe-htitle {
    padding-top: 50px;
    text-align: center;
    margin-bottom: 20px;
    font-size: 28px;
    color: #333;
}

/* Mobile responsive cards */
@media (max-width: 1200px) {
    .home-recipe-container {
        grid-template-columns: repeat(3, minmax(0, 300px));
        gap: 15px;
        padding: 15px;
    }

    .home-recipe-htitle {
        font-size: 26px;
        padding-top: 70px;
    }
}

@media (max-width: 900px) {
    .home-recipe-container {
        grid-template-columns: repeat(2, minmax(0, 300px));
        gap: 15px;
        padding: 15px;
    }

    .home-recipe-htitle {
        font-size: 24px;
        padding-top: 70px;
    }
}

@media (max-width: 600px) {
    .home-recipe-container {
        grid-template-columns: 1fr;
        padding: 15px 20px;
    }

    .home-recipe {
        max-width: 100%;
    }

    .home-recipe-photo {
        height: 200px;
    }

    .home-recipe-title {
        padding: 12px;
    }
}

.home-how-it-works {
    padding: 50px 20px;
    background-color: #fff;
}

/* CONTAINER LAYOUT */
.home-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto;
    gap: 30px;
    padding: 40px 0;
}

.home-reverse {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto;
    gap: 30px;
    padding: 40px 0;
}


/* TEXT STYLING */
.home-step1-text,
.home-step3-text {
    flex: 1;
    text-align: left;
}

.home-step2-text,
.home-step4-text {
    flex: 1;
    text-align: right;
}

.home-step1-text h2,
.home-step2-text h2,
.home-step3-text h2,
.home-step4-text h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #333;
}

.home-step1-text p,
.home-step2-text p,
.home-step3-text p,
.home-step4-text p {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
}

/* CTA BUTTON */
.home-btn {
    display: inline-block;
    padding: 14px 30px;
    background-color: #c91f1f;
    color: white;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    text-decoration: none;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(201, 31, 31, 0.3);
    position: relative;
    overflow: hidden;
    border: none;
}

.home-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.home-btn:hover {
    background-color: #a81717;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(168, 23, 23, 0.4);
}

.home-btn:hover:before {
    left: 100%;
}

.home-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(168, 23, 23, 0.3);
}

/* IMAGE STYLING */
.home-image {
    flex: 1;
    text-align: center;
}

.home-step1-image img,
.home-step2-image img,
.home-step3-image img,
.home-step4-image img {
    width: 100%;
    max-width: 450px;
    border-radius: 10px;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.1);
}

/* ALTERNATE LAYOUT FOR LEFT-RIGHT DESIGN */
.home-container:nth-child(even) {
    flex-direction: row-reverse;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .home-container {
        flex-direction: column !important;
        text-align: center;
    }

    .home-text,
    .home-image {
        width: 100%;
    }
}

.container {
    display: flex;
    gap: 20px;
}

.recipe-list {
    width: 20%;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
}

.recipe-list ul {
    list-style: none;
    padding: 0;
}

.recipe-list li {
    background: #fff;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    cursor: grab;
    border: 1px solid #ddd;
}

.schedule-container {
    display: flex;
    gap: 30px;
    padding: 80px 20px 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Sidebar Styling */
.schedule-sidebar {
    position: sticky;
    top: 80px;
    width: 280px;
    max-height: calc(100vh - 100px);
    background: #f9f9f9;
    padding: 0;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eaeaea;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.schedule-recipe-list {
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    padding: 15px;
    background: #fff;
    border-radius: 0 0 10px 10px;
}

.schedule-recipe {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    cursor: grab;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    position: relative;
    border: 1px solid #eee;
}

.schedule-recipe:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.schedule-recipe.dragging {
    opacity: 0.7;
    transform: scale(0.95);
}

.schedule-recipe p {
    margin: 0;
    font-size: 14px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-recipe-img {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.no-recipes-message {
    text-align: center;
    padding: 20px 0;
    color: #666;
}

.no-recipes-message a {
    color: #007bff;
    text-decoration: none;
}

/* Main Content Styling */
.schedule-week-container {
    flex: 1;
    min-width: 0;
    /* Important for flexbox to allow shrinking */
}

.dashboard-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 2px solid #e5e5e5;
    padding-bottom: 8px;
}

.dashboard-section-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
    position: relative;
    padding-left: 10px;
}

.dashboard-section-header h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background-color: #007bff;
    border-radius: 2px;
}

.week-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
}

.week-nav-btn {
    background: #007bff;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.week-nav-btn:hover {
    background-color: #0056b3;
}

.week-label {
    font-weight: 500;
    color: #444;
    padding: 0 10px;
}

.schedule-instructions {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    font-size: 14px;
}

.schedule-main {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.schedule-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 15px;
    transition: opacity 0.3s, transform 0.3s;
}

.schedule-day-column {
    background: #f9f9f9;
    border-radius: 8px;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid #eaeaea;
    display: flex;
    flex-direction: column;
}

.schedule-day-column.today {
    border: 1px solid #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

.day-header {
    margin: 0;
    padding: 8px;
    background-color: #eaeaea;
    color: #444;
    font-size: 14px;
    font-weight: 500;
}

.schedule-day-column.today .day-header {
    background-color: #007bff;
    color: white;
}

.schedule-dropzone {
    min-height: 80px;
    padding: 10px;
    background: #fff;
    transition: background-color 0.2s;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.schedule-dropzone.highlight-drop {
    background-color: rgba(0, 123, 255, 0.1);
    outline: 2px dashed #007bff;
    outline-offset: -2px;
}

/* Scheduled Recipe Styling */
.scheduled-recipe {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #eaeaea;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.scheduled-recipe:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.scheduled-recipe.fade-out {
    opacity: 0;
    transform: scale(0.9);
}

.scheduled-recipe-title {
    margin: 8px 0;
    font-size: 14px;
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.serving-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
}

.serving-button {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.serving-button:hover {
    background-color: #f0f0f0;
    border-color: #bbb;
}

.serving-count {
    font-weight: bold;
    width: 20px;
    text-align: center;
}

.remove-recipe {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    background: #ff5c5c;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    color: white;
    border-radius: 50%;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scheduled-recipe:hover .remove-recipe {
    opacity: 1;
    transform: scale(1);
}

.remove-recipe:hover {
    background: #e74c3c;
    transform: scale(1.1);
}

/* Improved focus states for accessibility */
.week-nav-btn:focus,
.serving-button:focus,
.remove-recipe:focus,
.dashboard-add-button:focus,
.shopping-list-button:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.schedule-recipe:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.25);
}

/* Empty state styling for dropzones */
.schedule-dropzone:empty::after {
    /* Static CSS cannot use Django template tags; set the desired placeholder text directly */
    content: "Solte a sua receita aqui";
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    color: #aaa;
    font-style: italic;
    font-size: 14px;
    opacity: 0.7;
}

/* Mobile-first styles */
@media (max-width: 768px) {

    .schedule-container {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .schedule-sidebar {
        position: static;
        display: none;
    }

    .schedule-week-container {
        width: 100%;
    }

    .schedule-week-grid {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .schedule-day-column {
        width: 100%;
        min-height: 120px;
    }

    #recipe-list {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 10px;
    }

    .schedule-recipe {
        min-width: 120px;
        flex-shrink: 0;
    }

    .day-header {
        font-size: 0.9rem;
        padding: 8px 4px;
    }

    .week-nav-btn {
        padding: 12px;
        font-size: 1.2rem;
    }

    .shopping-list-button {
        display: block;
        text-align: center;
        padding: 12px;
    }
}

.day-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
}

.add-recipe-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: #4CAF50;
    color: white;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.add-recipe-btn:hover {
    background: #388E3C;
    transform: scale(1.1);
}

.recipe-selector-row {
    position: absolute;
    z-index: 100;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 10px;
    width: calc(100% - 20px);
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

/* When the selector is inserted inline between days, make it part of the flow */
.recipe-selector-row.selector-inline {
    position: static;
    /* participate in layout */
    z-index: 1;
    /* normal stacking */
    width: 100%;
    max-width: none;
    margin: 8px 0 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    grid-column: 1 / -1;
    /* if inside a CSS grid, span all columns */
}

.recipe-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.close-recipe-selector {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #777;
    line-height: 1;
    padding: 0 5px;
}

.recipe-selector-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.recipe-selector-item {
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.2s;
    border: 1px solid #eee;
}

.recipe-selector-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border-color: #4CAF50;
}

.recipe-selector-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

.recipe-selector-item p {
    margin: 5px 0;
    padding: 0 5px;
    font-size: 0.85em;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}