/* Recipe Engagement Suite Styles */

:root {
    --res-primary: #6BBE44;
    --res-primary-dark: #4FA030;
    --res-primary-light: #85D45B;
    --res-accent: #FFB800;
    --res-light-bg: #F5FAF2;
    --res-white: #ffffff;
    --res-border: #E0EED9;
    --res-text-light: #5A6C57;
    --res-text-dark: #2D3B2A;
    --res-warm-cream: #F9FDF7;
}

/* Recipe Slider */
.recipe-filmstrip-container {
    display: none;
    background: var(--res-white);
    box-shadow: 0 4px 20px rgba(107, 190, 68, 0.1);
    padding: 10px 0;
    z-index: 999;
    border-bottom: 2px solid var(--res-border);
    max-height: 120px;
    height: 120px;
    transition: box-shadow 0.4s ease;
}

.recipe-filmstrip-container.show-slider {
    display: block;
    animation: slideInDown 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-120px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.recipe-filmstrip-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--res-primary), transparent);
    opacity: 0.4;
}

.recipe-filmstrip-container.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 6px 24px rgba(107, 190, 68, 0.15);
    background: rgba(255, 255, 255, 0.98);
}

.recipe-filmstrip-slider {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.recipe-slide-item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: var(--res-white);
    height: 110px;
    border: 1px solid var(--res-border);
    box-shadow: 0 2px 8px rgba(90, 108, 87, 0.08);
}

.recipe-slide-item:hover {
    box-shadow: 0 6px 20px rgba(107, 190, 68, 0.2);
    border-color: var(--res-primary);
    transform: translateY(-2px);
}

.recipe-slide-image {
    width: 100%;
    height: 75px;
    background-size: cover;
    background-position: center;
    background-color: var(--res-warm-cream);
    position: relative;
    flex-shrink: 0;
}

.recipe-slide-content {
    padding: 8px 10px 12px 10px;
    height: auto;
    min-height: 35px;
    overflow: hidden;
    background: white;
    display: flex;
    align-items: center;
}

.recipe-slide-content h4 {
    font-size: 0.75em;
    line-height: 1.3;
    color: var(--res-text-dark);
    margin: 0;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-bottom: 3px;
}


.swiper-button-next,
.swiper-button-prev {
    color: var(--res-primary) !important;
    background: var(--res-white) !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 12px rgba(90, 108, 87, 0.15) !important;
    transition: all 0.3s ease !important;
    border: 2px solid var(--res-border) !important;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px !important;
    font-weight: 700 !important;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: var(--res-primary) !important;
    color: white !important;
    transform: translateY(-50%) scale(1.1) !important;
    box-shadow: 0 6px 20px rgba(107, 190, 68, 0.3) !important;
}

/* Search Button */
.recipe-search-floating {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 1000;
}

.recipe-search-trigger {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--res-primary);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(107, 190, 68, 0.35);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recipe-search-trigger:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 28px rgba(107, 190, 68, 0.45);
    background: var(--res-primary-dark);
}

/* Search Modal */
.recipe-search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(45, 59, 42, 0.5);
    z-index: 1999;
    opacity: 0;
    transition: opacity 0.4s;
    backdrop-filter: blur(4px);
}

.recipe-search-overlay.active {
    opacity: 1;
}

.recipe-search-panel {
    display: none;
    position: fixed;
    bottom: -100vh;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 85vh;
    background: var(--res-white);
    z-index: 2000;
    box-shadow: 0 -6px 30px rgba(90, 108, 87, 0.2);
    overflow-y: auto;
    transition: bottom 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 20px 20px 0 0;
}

.recipe-search-panel.active {
    bottom: 0;
}

.recipe-search-header {
    padding: 28px;
    border-bottom: 2px solid var(--res-border);
    position: sticky;
    top: 0;
    background: var(--res-white);
    z-index: 10;
    border-radius: 20px 20px 0 0;
}

.recipe-search-header h3 {
    font-size: 1.6em;
    color: var(--res-primary-dark);
    margin: 0;
    font-weight: 700;
}

.recipe-search-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: var(--res-text-light);
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.recipe-search-close:hover {
    color: var(--res-primary);
    background: var(--res-warm-cream);
    transform: rotate(90deg);
}

.recipe-search-input-wrapper {
    padding: 24px 28px;
    border-bottom: 1px solid var(--res-border);
    background: var(--res-light-bg);
}

#recipe-search-input {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid var(--res-border);
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: white;
    font-weight: 500;
    color: var(--res-text-dark);
}

#recipe-search-input::placeholder {
    color: var(--res-text-light);
    opacity: 0.7;
}

#recipe-search-input:focus {
    outline: none;
    border-color: var(--res-primary);
    box-shadow: 0 0 0 3px rgba(107, 190, 68, 0.1);
}

.recipe-search-results {
    padding: 30px 0;
    background: var(--res-light-bg);
}

.recipe-category-section {
    margin-bottom: 40px;
}

/* Category Header with Simple Links */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 28px 16px;
}

.category-title-link {
    text-decoration: none;
    color: var(--res-primary-dark);
    transition: color 0.3s ease;
}

.category-title-link:hover {
    color: var(--res-primary);
}

.category-title-link h3 {
    font-size: 1.5em;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.3px;
}

.view-all-link {
    color: var(--res-primary);
    text-decoration: none;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 6px;
}

.view-all-link:hover {
    color: var(--res-primary-dark);
    background: var(--res-warm-cream);
}

.recipe-scroll-container {
    display: flex;
    justify-content: center;
    overflow-x: auto;
    padding: 0 28px 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--res-primary) var(--res-border);
}

.recipe-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.recipe-scroll-container::-webkit-scrollbar-track {
    background: var(--res-border);
    border-radius: 10px;
    margin: 0 28px;
}

.recipe-scroll-container::-webkit-scrollbar-thumb {
    background: var(--res-primary);
    border-radius: 10px;
}

.recipe-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--res-primary-dark);
}

.recipe-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    min-width: min-content;
    padding: 4px;
}

/* Recipe Card - Without Favorite Button */
.recipe-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    border: 1px solid var(--res-border);
    box-shadow: 0 4px 12px rgba(90, 108, 87, 0.08);
    width: 220px;
    flex-shrink: 0;
}

.recipe-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 32px rgba(107, 190, 68, 0.2);
    border-color: var(--res-primary);
}

.recipe-card-image {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: var(--res-warm-cream);
    position: relative;
}

.recipe-card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recipe-card-title {
    font-size: 1em;
    font-weight: 600;
    color: var(--res-text-dark);
    margin: 0;
    line-height: 1.4;
    min-height: 42px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.recipe-card-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--res-text-light);
    font-size: 0.85em;
    padding-top: 4px;
}

.recipe-card-rating,
.recipe-card-time {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

.recipe-card-rating-stars {
    color: var(--res-accent);
    font-size: 1.1em;
}

.search-loading {
    text-align: center;
    padding: 80px 24px;
    color: var(--res-text-light);
    font-size: 1em;
}

.search-loading::before {
    content: '⟳';
    display: block;
    font-size: 2.5em;
    margin-bottom: 16px;
    animation: spin 1s linear infinite;
    color: var(--res-primary);
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.no-results {
    text-align: center;
    padding: 80px 24px;
    color: var(--res-text-dark);
    font-size: 1.1em;
}

/* Responsive */
@media (max-width: 768px) {
    .recipe-filmstrip-container {
        max-height: 120px;
        padding: 10px 0;
    }

    .recipe-slide-item {
        height: 110px;
    }

    .recipe-filmstrip-slider {
        padding: 0 12px;
    }

    .swiper-button-next,
    .swiper-button-prev {
        width: 34px !important;
        height: 34px !important;
    }

    .recipe-search-floating {
        bottom: 24px;
        right: 24px;
    }

    .recipe-search-trigger {
        width: 56px;
        height: 56px;
    }

    .recipe-search-header {
        padding: 20px;
    }

    .recipe-search-header h3 {
        font-size: 1.4em;
    }

    .recipe-search-input-wrapper {
        padding: 16px 20px;
    }

    .recipe-scroll-container {
        padding: 0 20px 16px;
    }

    .recipe-card {
        width: 180px;
    }

    .recipe-card-image {
        height: 140px;
    }

    .category-header {
        padding: 0 20px 12px;
    }

    .category-title-link h3 {
        font-size: 1.3em;
    }

    .view-all-link {
        font-size: 0.9em;
        padding: 6px 12px;
    }
}
