/* ===== UNIFIED CSS FOR RECIPES, DRINKS, AND SNACKS ===== */

/* ===== BASE STYLING AND ANIMATIONS (SHARED) ===== */
.hover-shadow {
    transition: box-shadow 0.3s, transform 0.3s;
}

.hover-shadow:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-3px);
}

@keyframes popoverFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes filterFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes btnPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes highlightPulse {
    0% {
        box-shadow: 0 0 15px rgba(40, 167, 69, 0.5);
        transform: translateY(-3px);
    }

    50% {
        box-shadow: 0 0 25px rgba(40, 167, 69, 0.8);
        transform: translateY(-5px);
    }

    100% {
        box-shadow: 0 0 15px rgba(40, 167, 69, 0.5);
        transform: translateY(-3px);
    }
}

/* ===== ITEM-SPECIFIC CARD AND IMAGE STYLING ===== */

/* Recipe specific styles */
.recipe-img {
    height: 200px;
    object-fit: contain;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
}

.recipe-name-highlight {
    font-size: 1.25rem !important;
    color: var(--bs-body-color) !important;
    font-weight: 600 !important;
    margin-bottom: 0.5rem !important;
    position: relative;
    padding-bottom: 0.25rem;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 0.5rem;
    text-decoration-color: var(--bs-body-color);
}

.card-title.recipe-name-highlight {
    font-size: 1.5rem !important;
    padding-bottom: 0.5rem;
}

/* Drink specific styles */
.drink-img {
    height: 200px;
    object-fit: contain;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
}

.drink-name-highlight {
    font-size: 1.25rem !important;
    color: var(--bs-body-color) !important;
    font-weight: 600 !important;
    margin-bottom: 0.5rem !important;
    position: relative;
    padding-bottom: 0.25rem;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 0.5rem;
    text-decoration-color: var(--bs-body-color);
}

.card-title.drink-name-highlight {
    font-size: 1.5rem !important;
    padding-bottom: 0.5rem;
}

/* Snack specific styles */
.snack-img {
    height: 200px;
    object-fit: contain;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
}

.snack-name-highlight {
    font-size: 1.25rem !important;
    color: var(--bs-body-color) !important;
    font-weight: 600 !important;
    margin-bottom: 0.5rem !important;
    position: relative;
    padding-bottom: 0.25rem;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 0.5rem;
    text-decoration-color: var(--bs-body-color);
}

.card-title.snack-name-highlight {
    font-size: 1.5rem !important;
    padding-bottom: 0.5rem;
}

/* Shared table thumbnail */
.table-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

/* ===== ENHANCED NUTRITION PILLS (SHARED) ===== */
.nutrition-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.nutrition-pill {
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-weight: normal;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

.nutrition-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

.nutrition-pill:focus {
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Nutrition pill colors */
.bg-calories {
    background-color: #f5a244 !important;
    color: #212529;
}

.bg-protein {
    background-color: #7e80e5 !important;
    color: white;
}

.bg-carbs {
    background-color: #2aa6cf !important;
    color: white;
}

.bg-fat {
    background-color: #ffb907 !important;
    color: #212529;
}

/* ===== ENHANCED POPOVER STYLING (SHARED) ===== */
.popover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    border-radius: 0.5rem !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    animation: popoverFadeIn 0.2s ease !important;
    max-width: 300px;
}

.popover-header {
    display: flex !important;
    align-items: center !important;
    background-color: rgba(var(--bs-light-rgb), 0.8) !important;
    border-top-left-radius: 0.5rem !important;
    border-top-right-radius: 0.5rem !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    padding: 0.5rem 0.75rem !important;
}

.popover-body {
    padding: 0 !important;
}

.nutrition-content-calories {
    border-top: 3px solid #f5a244 !important;
}

.nutrition-content-protein {
    border-top: 3px solid #7e80e5 !important;
}

.nutrition-content-carbs {
    border-top: 3px solid #2aa6cf !important;
}

.nutrition-content-fat {
    border-top: 3px solid #ffb907 !important;
}

/* Nutrition popover content styling */
.nutrition-value {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.nutrition-heading {
    color: var(--bs-gray-600);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.nutrition-detail {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

/* Comprehensive nutrition popover content */
.nutrition-popover-comprehensive .nutrition-value-card .card {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.nutrition-popover-comprehensive .nutrition-value-card .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.nutrition-popover-comprehensive .nutrition-value-card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.nutrition-popover-comprehensive .nutrition-value-card .card-subtitle {
    font-size: 0.8rem;
    font-weight: 500;
}

.nutrition-popover-comprehensive .alert-light {
    background-color: rgba(var(--bs-light-rgb), 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 0.5rem;
}

/* ===== INGREDIENTS LIST STYLING (SHARED) ===== */
.ingredients-list-compact {
    max-height: 250px;
    overflow-y: auto;
    border-radius: 0.25rem;
    padding: 0.5rem;
    background-color: rgba(var(--bs-light-rgb), 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.ingredient-name-container {
    flex: 1;
    min-width: 0;
}

.form-check {
    margin-bottom: 0;
}

.form-check-label {
    word-wrap: break-word;
    word-break: break-word;
}

.ingredient-amount {
    white-space: nowrap;
    margin-left: 8px;
}

.list-group-item {
    transition: background-color 0.2s;
}

.list-group-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.list-group-item .form-check-input:checked+.form-check-label {
    text-decoration: line-through;
    color: #6c757d;
}

/* Table view ingredient styling */
.ingredient-row {
    font-size: 0.85rem;
    padding: 0.25rem 0;
    transition: background-color 0.2s;
}

.ingredient-row:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.ingredient-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 0.5rem;
}

/* ===== MODERN FILTER STYLES (SHARED) ===== */
.active-filter {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--bs-tertiary-bg);
    border-radius: 50px;
    border: 1px solid var(--bs-border-color);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.active-filter:hover {
    background-color: var(--bs-secondary-bg);
    border-color: var(--bs-border-color-translucent);
}

.active-filter .remove-filter {
    transition: all 0.2s ease;
    color: var(--bs-danger);
    margin-left: 0.5rem;
}

.active-filter .remove-filter:hover {
    transform: scale(1.2);
    opacity: 0.85;
}

/* Quick access filter buttons */
.quick-filter-btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border-width: 1px;
}

.quick-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

.quick-filter-btn.active {
    box-shadow: 0 0.25rem 0.5rem rgba(var(--bs-primary-rgb), 0.2);
}

.filter-fade-in {
    animation: filterFadeIn 0.3s forwards;
}

/* ===== ADVANCED SEARCH PANEL STYLING (SHARED) ===== */
#advancedSearch {
    transition: all 0.3s ease;
}

#advancedSearch.collapsing {
    overflow: hidden;
}

.advanced-search-button {
    transition: all 0.2s ease;
    color: var(--bs-primary);
    text-decoration: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.advanced-search-button:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

.advanced-search-button i.fa-chevron-down {
    transition: transform 0.3s ease;
}

.advanced-search-button[aria-expanded="true"] i.fa-chevron-down {
    transform: rotate(180deg);
}

.more-filters-button {
    transition: all 0.2s ease;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.more-filters-button:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

.filter-toggle-icon {
    transition: transform 0.3s ease;
}

.more-filters-button[aria-expanded="true"] .filter-toggle-icon {
    transform: rotate(180deg);
}

.filter-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background-color: var(--bs-primary-subtle);
    color: var(--bs-primary-emphasis);
    font-size: 0.7rem;
    padding: 0 0.4rem;
    margin-left: 0.35rem;
}

/* ===== ENHANCED SEARCH AND FILTER STYLING (SHARED) ===== */
.search-card {
    transition: all 0.3s ease;
}

.search-card:focus-within {
    box-shadow: 0 0.5rem 1rem rgba(var(--bs-primary-rgb), 0.1) !important;
}

.search-input-wrapper .form-control:focus {
    box-shadow: none;
    border-color: var(--bs-primary);
}

.search-input-wrapper .input-group-text {
    border-color: var(--bs-border-color);
}

.search-input-wrapper .form-control:focus+.input-group-text,
.search-input-wrapper .input-group-text+.form-control:focus {
    border-color: var(--bs-primary);
}

/* ===== SELECT2 ENHANCEMENTS (SHARED) ===== */
.select2-container--bootstrap-5 .select2-selection {
    border-radius: 0.375rem;
    border: 1px solid var(--bs-border-color);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

.select2-container--bootstrap-5 .select2-dropdown {
    border-color: var(--bs-primary);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* ===== TOGGLE BUTTON STYLES (SHARED) ===== */
.btn-modern {
    padding: 0.5rem 0.75rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--bs-tertiary-bg);
    border-color: var(--bs-border-color);
    color: var(--bs-body-color);
    transition: all 0.3s ease;
}

.btn-modern:hover {
    background-color: var(--bs-secondary-bg);
}

.toggle-button {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 2rem;
    transition: all 0.3s ease;
}

.toggle-button:hover {
    background-color: var(--bs-tertiary-bg);
}

.toggle-label {
    font-size: 0.85rem;
    margin-right: 0.5rem;
    color: var(--bs-secondary-color);
}

.toggle-track {
    width: 36px;
    height: 20px;
    background-color: var(--bs-tertiary-bg);
    border-radius: 10px;
    margin: 0 0.5rem;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.toggle-track.active {
    background-color: var(--bs-primary);
}

.toggle-thumb {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: var(--bs-white);
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-track.active .toggle-thumb {
    transform: translateX(16px);
}

.view-icon,
.format-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-secondary-color);
    width: 24px;
    height: 24px;
    transition: color 0.3s ease;
}

.view-icon.active,
.format-icon.active {
    color: var(--bs-primary);
}

/* View toggles container */
.view-toggles {
    display: flex;
    gap: 0.5rem;
}

.view-toggle-container {
    background-color: var(--bs-tertiary-bg);
    border-radius: 1rem;
    padding: 0.3rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Button animation */
.btn-pulse {
    animation: btnPulse 0.4s;
}

/* ===== HIGHLIGHT ITEM STYLING (ITEM-SPECIFIC) ===== */

/* Recipe highlighting */
.highlight-recipe {
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.5) !important;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    animation: highlightPulse 1.5s infinite;
    border: 2px solid #28a745 !important;
    background-color: rgba(40, 167, 69, 0.05);
    position: relative;
    z-index: 2;
}

#table-view .highlight-recipe {
    box-shadow: none !important;
    animation: none;
    background-color: rgba(40, 167, 69, 0.1);
    border: none !important;
    border-left: 4px solid #28a745 !important;
}

/* Drink highlighting */
.highlight-drink {
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.5) !important;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    animation: highlightPulse 1.5s infinite;
    border: 2px solid #28a745 !important;
    background-color: rgba(40, 167, 69, 0.05);
    position: relative;
    z-index: 2;
}

#table-view .highlight-drink {
    box-shadow: none !important;
    animation: none;
    background-color: rgba(40, 167, 69, 0.1);
    border: none !important;
    border-left: 4px solid #28a745 !important;
}

/* Snack highlighting */
.highlight-snack {
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.5) !important;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    animation: highlightPulse 1.5s infinite;
    border: 2px solid #28a745 !important;
    background-color: rgba(40, 167, 69, 0.05);
    position: relative;
    z-index: 2;
}

#table-view .highlight-snack {
    box-shadow: none !important;
    animation: none;
    background-color: rgba(40, 167, 69, 0.1);
    border: none !important;
    border-left: 4px solid #28a745 !important;
}

/* ===== TOAST CONTAINER STYLING (SHARED) ===== */
#toast-container {
    z-index: 1100;
}

/* ===== SELECT2 STYLING FIX (SHARED) ===== */
.select2-selection__choice,
.select2-search.select2-search--inline {
    list-style-type: none !important;
    list-style: none !important;
}

.select2-selection__choice::marker,
.select2-search.select2-search--inline::marker {
    display: none !important;
    content: none !important;
    font-size: 0 !important;
}

.select2-selection__choice::before,
.select2-search.select2-search--inline::before {
    display: none !important;
    content: none !important;
}

.select2-selection__rendered {
    list-style-type: none !important;
    list-style: none !important;
    padding-left: 0.5rem !important;
}

.select2-selection--multiple .select2-selection__rendered li,
.select2-selection--multiple .select2-search--inline {
    list-style-type: none !important;
    list-style: none !important;
}

.select2-search--inline .select2-search__field {
    margin-left: 0 !important;
    padding-left: 0.5rem !important;
    background: transparent !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered {
    padding-left: 0.5rem !important;
    margin-bottom: 5px;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-search--inline {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.select2-selection--multiple li {
    list-style-type: none !important;
    list-style-position: inside !important;
}

/* ===== TABLE INGREDIENTS VIEW TOGGLE STYLING (SHARED) ===== */
.ingredients-toggle-btn {
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--bs-primary);
    background: none;
    border: none;
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    margin-top: 0.5rem;
    transition: all 0.2s ease;
}

.ingredients-toggle-btn:hover {
    text-decoration: underline;
    color: var(--bs-primary-hover);
}

.ingredients-toggle-btn i {
    transition: transform 0.3s;
}

.ingredients-toggle-btn.active i {
    transform: rotate(180deg);
}

.extra-ingredients-table {
    background-color: rgba(var(--bs-light-rgb), 0.5);
    padding-left: 1rem;
    border-left: 2px solid var(--bs-primary);
}

/* ===== NUTRITION PROGRESS TOGGLE (SHARED) ===== */
.nutrition-progress-toggle {
    background: transparent;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nutrition-progress-toggle:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.nutrition-toggle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 5px;
    position: relative;
}

.nutrition-toggle-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 5px;
    font-size: 0.65rem;
    color: var(--bs-secondary-color);
}

.toggle-label-mini {
    width: 33.33%;
    text-align: center;
    position: relative;
    transition: color 0.3s;
}

.progress-track {
    height: 2px;
    width: 90%;
    background-color: transparent;
    border-radius: 1px;
    position: relative;
    border: 1px solid var(--bs-border-color);
}

.progress-indicator {
    height: 8px;
    width: 8px;
    background-color: var(--bs-primary);
    border-radius: 50%;
    position: absolute;
    top: -4px;
    transition: transform 0.3s ease;
}

.progress-indicator.position-1 {
    transform: translateX(0%);
    left: 7.5%;
}

.progress-indicator.position-2 {
    transform: translateX(0%);
    left: 45%;
}

.progress-indicator.position-3 {
    transform: translateX(0%);
    left: 83.5%;
}

.nutrition-icon {
    width: 33.33%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--bs-gray-500);
    transition: color 0.3s;
    font-size: 0.9rem;
}

.nutrition-icon.active {
    color: var(--bs-primary);
}

/* Add style for the info icon */
.fa-circle-info {
    color: var(--bs-gray-500);
    cursor: help;
    font-size: 0.8rem;
    transition: color 0.2s;
}

.fa-circle-info:hover {
    color: var(--bs-primary);
}

/* ===== GLASSMORPHISM SEARCH BUTTON STYLING (SHARED) ===== */
.search-input-wrapper {
    position: relative;
}

.search-input-wrapper .form-control {
    padding: 0.5rem 0.75rem;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-input-wrapper .form-control:focus {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: rgba(255, 255, 255, 0.8);
}

.search-icon {
    color: var(--bs-secondary-color);
    z-index: 5;
}

.search-glass-btn {
    height: 100%;
    width: 40px;
    /* Glassmorphism effect */
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.18);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);

    /* Button structure */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 35px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    transition: all 0.3s ease;
}

.search-glass-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
    transform: translateY(-50%) scale(1.05);
}

.search-glass-btn i {
    font-size: 1.1rem;
    color: var(--bs-primary);
}

/* ===== COLLECTION VIEW STYLING (SHARED) ===== */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.collection-item {
    transition: transform 0.2s ease-in-out;
}

.collection-item:hover {
    transform: translateY(-5px);
}

.collection-img {
    height: 120px;
    object-fit: cover;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
}

.nutrition-pills-mini {
    font-size: 0.7rem;
}

.nutrition-pills-mini .badge {
    padding: 0.35em 0.5em;
}

.collection-actions {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
}

.collection-actions .btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
}

/* ===== UPDATED VIEWTYPE TOGGLE BUTTON GROUP (SHARED) ===== */
.view-toggle-container .btn-group {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

.view-toggle-container .btn-group .btn {
    border-radius: 0;
    padding: 0.25rem 0.5rem;
    transition: all 0.2s ease;
}

.view-toggle-container .btn-group .btn:first-child {
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

.view-toggle-container .btn-group .btn:last-child {
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.view-toggle-container .btn-group .btn i {
    font-size: 1.125rem;
}

.view-toggle-container .btn-group .btn.btn-primary {
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(var(--bs-primary-rgb), 0.3);
}

/* ===== ITEM COLLECTIONS (ITEM-SPECIFIC) ===== */

/* Recipe collections */
.recipe-collections {
    display: flex;
    flex-direction: row;
    gap: 50px;
    padding: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.recipe-collection {
    position: relative;
}

/* Drink collections */
.drink-collections {
    display: flex;
    flex-direction: row;
    gap: 50px;
    padding: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.drink-collection {
    position: relative;
}

/* Snack collections */
.snack-collections {
    display: flex;
    flex-direction: row;
    gap: 50px;
    padding: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.snack-collection {
    position: relative;
}

/* Shared collection styling */
.collection-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--bs-primary);
    margin: 0;
    padding-bottom: 8px;
    position: relative;
    display: inline-block;
}

.collection-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50%;
    height: 3px;
    background-color: var(--bs-primary);
    border-radius: 3px;
}

.recipe-count,
.drink-count,
.snack-count {
    font-size: 0.9rem;
    color: var(--bs-secondary);
    background-color: var(--bs-light);
    padding: 4px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
}

/* ===== SWIPER CONTAINER (SHARED) ===== */
.swiper {
    width: 300px;
    height: auto;
    margin: 0 auto;
}

/* ===== ITEM CARDS (ITEM-SPECIFIC) ===== */

/* Recipe Card */
.recipe-card {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    background-color: var(--bs-body-bg);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recipe-image {
    height: 160px;
    position: relative;
    overflow: hidden;
}

.recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.recipe-card:hover .recipe-image img {
    transform: scale(1.05);
}

.recipe-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 1;
}

.recipe-badge.private {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
}

.recipe-details {
    flex: 1;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.recipe-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--bs-body-color);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recipe-nutrition {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.recipe-actions {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Drink Card */
.drink-card {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    background-color: var(--bs-body-bg);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.drink-image {
    height: 160px;
    position: relative;
    overflow: hidden;
}

.drink-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.drink-card:hover .drink-image img {
    transform: scale(1.05);
}

.drink-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 1;
}

.drink-badge.private {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
}

.drink-details {
    flex: 1;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.drink-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--bs-body-color);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drink-nutrition {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.drink-actions {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Snack Card */
.snack-card {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    background-color: var(--bs-body-bg);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.snack-image {
    height: 160px;
    position: relative;
    overflow: hidden;
}

.snack-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.snack-card:hover .snack-image img {
    transform: scale(1.05);
}

.snack-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    z-index: 1;
}

.snack-badge.private {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
}

.snack-details {
    flex: 1;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.snack-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--bs-body-color);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.snack-nutrition {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.snack-actions {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Shared nutrition item and button styling */
.nutrition-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 8px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.85rem;
}

.btn-recipe,
.btn-drink,
.btn-snack {
    border-radius: 20px;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-recipe i,
.btn-drink i,
.btn-snack i {
    margin-right: 4px;
}

.btn-details {
    background-color: var(--bs-primary);
    color: white;
}

.btn-details:hover {
    background-color: var(--bs-primary-hover, var(--bs-primary-dark, #0d6efd));
    color: white;
    transform: translateY(-2px);
}

.btn-group {
    display: flex;
    gap: 6px;
}

.btn-edit,
.btn-clone,
.btn-add {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.btn-edit i,
.btn-clone i,
.btn-add i {
    margin: 0;
}

.btn-edit {
    background-color: var(--bs-gray-200);
    color: var(--bs-gray-700);
}

.btn-clone {
    background-color: var(--bs-info-bg-subtle, rgba(13, 202, 240, 0.1));
    color: var(--bs-info);
}

.btn-add {
    background-color: var(--bs-success-bg-subtle, rgba(25, 135, 84, 0.1));
    color: var(--bs-success);
}

.btn-edit:hover,
.btn-clone:hover,
.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

/* ===== SWIPER-SPECIFIC STYLES FOR THE CARDS EFFECT (SHARED) ===== */
.swiper-slide {
    background-position: center;
    background-size: cover;
    width: 280px;
    height: fit-content;
    border-radius: 20px;
}

.swiper-slide-shadow-left,
.swiper-slide-shadow-right {
    border-radius: 20px;
}

/* ===== MODERN SETTINGS PANEL STYLING (SHARED) ===== */
.settings-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: flex-end;
}

/* Base styling for all setting controls */
.setting-control {
    background: var(--bs-tertiary-bg);
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    min-width: 120px;
}

.setting-control:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

/* Accent top border with gradient */
.setting-control::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--bs-primary), var(--bs-info));
    opacity: 0.8;
}

.setting-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--bs-secondary-color);
    text-align: center;
}

/* View Type Toggle Styling */
.view-toggle-container {
    background: var(--bs-tertiary-bg);
    border-radius: 0.5rem;
    padding: 0.25rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    min-width: 150px;
    height: 100%;
}

.view-toggle-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.view-toggle-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--bs-primary) 0%, var(--bs-info) 100%);
    opacity: 0.8;
}

.setting-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--bs-secondary-text-emphasis);
    text-align: center;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-group {
    background: rgba(0, 0, 0, 0.04);
    border-radius: 10px;
    padding: 4px;
    display: flex;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Custom styled view type buttons */
.view-type-btn {
    border-radius: 8px !important;
    margin: 0 2px;
    border: none !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    height: 36px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.view-type-btn:hover {
    transform: translateY(-1px);
}

/* Create a more interesting active state with a glow effect */
.view-type-btn.btn-primary {
    box-shadow: 0 3px 10px rgba(var(--bs-primary-rgb), 0.4);
}

.view-type-btn.btn-primary::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center,
            rgba(var(--bs-primary-rgb), 0.5) 0%,
            transparent 70%);
    opacity: 0.6;
    z-index: -1;
    animation: pulse 2s infinite;
}

.view-type-btn.btn-outline-primary {
    background-color: transparent;
    color: var(--bs-secondary-color);
}

.view-type-btn.btn-outline-primary:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
}

.view-type-btn i {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.view-type-btn:hover i {
    transform: scale(1.15);
}

.view-type-btn.btn-primary i {
    animation: iconPulse 2s infinite;
}

/* Active tooltip indicator */
.view-type-btn.btn-primary::before {
    content: attr(title);
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bs-primary);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    opacity: 0;
    transition: opacity 0.3s ease, bottom 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.view-toggle-container:hover .view-type-btn.btn-primary::before {
    opacity: 1;
    bottom: -20px;
}

/* Animations */
@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 0.5;
    }
}

@keyframes iconPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }

    100% {
        transform: scale(1);
    }
}

/* Maintain consistent styling for other panels */
.format-toggle-container,
.nutrition-toggle-container {
    background: var(--bs-tertiary-bg);
    border-radius: 0.5rem;
    padding: 0.25rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.format-toggle-container:hover,
.nutrition-toggle-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.format-toggle-container::before,
.nutrition-toggle-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--bs-primary) 0%, var(--bs-info) 100%);
    opacity: 0.8;
}

/* Number Format Toggle Styling */
.toggle-button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 8px 0;
    width: 100%;
    transition: all 0.2s ease;
}

.toggle-track {
    width: 44px;
    height: 22px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 11px;
    margin: 0 8px;
    position: relative;
    transition: background-color 0.3s ease;
}

.toggle-track.active {
    background-color: var(--bs-primary);
}

.toggle-thumb {
    position: absolute;
    width: 18px;
    height: 18px;
    background-color: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-track.active .toggle-thumb {
    transform: translateX(22px);
}

.format-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-secondary-color);
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.format-icon.active {
    color: var(--bs-primary);
    font-weight: 500;
}

/* Nutrition Toggle Styling */
.nutrition-toggle-container {
    background: var(--bs-tertiary-bg);
    border-radius: 0.5rem;
    padding: 10px 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    min-width: 170px;
    height: 100%;
}

.nutrition-toggle-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.nutrition-toggle-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--bs-primary), var(--bs-info));
    opacity: 0.8;
}

.nutrition-progress-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border: none;
    padding: 5px 0;
    width: 100%;
}

.nutrition-toggle-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 4px;
}

.nutrition-icon {
    width: 33.33%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--bs-gray-500);
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.nutrition-icon.active {
    color: var(--bs-primary);
    font-weight: 600;
}

.progress-track {
    height: 4px;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.08);
    border-radius: 2px;
    position: relative;
    margin: 6px 0;
}

.progress-indicator {
    height: 14px;
    width: 14px;
    background-color: var(--bs-primary);
    border: 2px solid white;
    border-radius: 50%;
    position: absolute;
    transform: translateY(-50%);
    transition: left 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.progress-indicator.position-1 {
    left: 11.5%;
}

.progress-indicator.position-2 {
    left: 46%;
}

.progress-indicator.position-3 {
    left: 80.5%;
}

.nutrition-toggle-footer {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 4px;
}

.toggle-label-mini {
    width: 33.33%;
    text-align: center;
    font-size: 0.7rem;
    color: var(--bs-secondary-color);
    transition: color 0.3s ease;
}

.toggle-label-mini.active {
    color: var(--bs-primary);
    font-weight: 500;
}

/* Entry animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.view-toggle-container,
.format-toggle-container,
.nutrition-toggle-container {
    animation: fadeInUp 0.4s ease forwards;
}

.view-toggle-container {
    animation-delay: 0s;
}

.format-toggle-container {
    animation-delay: 0.1s;
}

.nutrition-toggle-container {
    animation-delay: 0.2s;
}

/* ===== COLLECTION VIEW SPECIFIC STYLES FOR ALL ITEM TYPES ===== */

/* Recipe Collection View */
#collection-view .collection-recipes-container {
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

/* Drink Collection View */
#collection-view .collection-drinks-container {
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

/* Snack Collection View */
#collection-view .collection-snacks-container {
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

#collection-view .collection-category-section {
    position: relative;
}

/* Collection Header */
#collection-view .collection-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

#collection-view .collection-category-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--bs-primary);
    margin: 0;
    display: flex;
    align-items: center;
    position: relative;
}

#collection-view .collection-category-title::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60%;
    height: 4px;
    background: var(--bs-primary);
    border-radius: 2px;
}

#collection-view .collection-category-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#collection-view .collection-recipe-count,
#collection-view .collection-drink-count,
#collection-view .collection-snack-count {
    background: var(--bs-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(var(--bs-primary-rgb), 0.3);
}

/* Swiper Container */
#collection-view .collection-swiper-container {
    position: relative;
    margin-top: 2rem;
}

/* Swipe Instruction */
#collection-view .collection-swipe-instruction {
    text-align: center;
    padding: 0.6rem 1rem;
    background: rgba(var(--bs-primary-rgb), 0.95);
    border: 2px solid var(--bs-primary);
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    position: absolute;
    top: -4.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    animation: collectionSwipePulse 2s infinite;
    box-shadow: 0 4px 15px rgba(var(--bs-primary-rgb), 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 1;
    transition: opacity 0.5s ease, transform 0.5s ease;
    white-space: nowrap;
}

#collection-view .collection-swipe-instruction.fade-out {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
    pointer-events: none;
}

#collection-view .collection-swipe-arrows {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

#collection-view .collection-swipe-arrows i {
    font-size: 0.75rem;
    animation: collectionSwipeArrow 1.5s infinite alternate;
    color: white;
}

#collection-view .collection-swipe-arrows i:nth-child(2) {
    animation-delay: 0.2s;
}

@keyframes collectionSwipePulse {

    0%,
    100% {
        opacity: 0.5;
        transform: translateX(-50%) scale(1);
    }

    50% {
        opacity: 0.7;
        transform: translateX(-50%) scale(1.02);
    }
}

@keyframes collectionSwipeArrow {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(2px);
    }
}

/* Enhanced Swiper Styling for Collection */
#collection-view .swiper {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    position: relative;
}

#collection-view .swiper-slide {
    background-position: center;
    background-size: cover;
    width: 280px;
    height: fit-content !important;
    border-radius: 20px;
}

#collection-view .swiper-slide-shadow-left,
#collection-view .swiper-slide-shadow-right {
    border-radius: 20px;
}

/* Collection Item Cards */
#collection-view .collection-recipe-card,
#collection-view .collection-drink-card,
#collection-view .collection-snack-card {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    background: var(--bs-body-bg);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

#collection-view .collection-recipe-card:hover,
#collection-view .collection-drink-card:hover,
#collection-view .collection-snack-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Collection Item Headers */
#collection-view .collection-recipe-header,
#collection-view .collection-drink-header,
#collection-view .collection-snack-header {
    position: relative;
    height: 140px;
    flex-shrink: 0;
}

#collection-view .collection-recipe-image,
#collection-view .collection-drink-image,
#collection-view .collection-snack-image {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

#collection-view .collection-recipe-image img,
#collection-view .collection-drink-image img,
#collection-view .collection-snack-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

#collection-view .collection-recipe-card:hover .collection-recipe-image img,
#collection-view .collection-drink-card:hover .collection-drink-image img,
#collection-view .collection-snack-card:hover .collection-snack-image img {
    transform: scale(1.08);
}

#collection-view .collection-recipe-overlay,
#collection-view .collection-drink-overlay,
#collection-view .collection-snack-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.3) 0%,
            transparent 50%,
            rgba(0, 0, 0, 0.1) 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
}

/* Collection Item Badges */
#collection-view .collection-recipe-badges,
#collection-view .collection-drink-badges,
#collection-view .collection-snack-badges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-left: auto;
}

#collection-view .collection-recipe-badge,
#collection-view .collection-drink-badge,
#collection-view .collection-snack-badge {
    padding: 0.3rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
}

#collection-view .collection-recipe-badge.collection-private,
#collection-view .collection-drink-badge.collection-private,
#collection-view .collection-snack-badge.collection-private {
    background: rgba(220, 53, 69, 0.9);
}

#collection-view .collection-recipe-badge.collection-difficulty,
#collection-view .collection-drink-badge.collection-difficulty,
#collection-view .collection-snack-badge.collection-difficulty {
    background: rgba(0, 0, 0, 0.7);
}

#collection-view .collection-recipe-badge.collection-easy,
#collection-view .collection-drink-badge.collection-easy,
#collection-view .collection-snack-badge.collection-easy {
    background: rgba(40, 167, 69, 0.9);
}

#collection-view .collection-recipe-badge.collection-medium,
#collection-view .collection-drink-badge.collection-medium,
#collection-view .collection-snack-badge.collection-medium {
    background: rgba(255, 193, 7, 0.9);
}

#collection-view .collection-recipe-badge.collection-hard,
#collection-view .collection-drink-badge.collection-hard,
#collection-view .collection-snack-badge.collection-hard {
    background: rgba(255, 123, 0, 0.9);
}

#collection-view .collection-recipe-badge.collection-expert,
#collection-view .collection-drink-badge.collection-expert,
#collection-view .collection-snack-badge.collection-expert {
    background: rgba(220, 53, 69, 0.9);
}

/* Collection Item Content */
#collection-view .collection-recipe-content,
#collection-view .collection-drink-content,
#collection-view .collection-snack-content {
    flex: 1;
    padding: 1rem 1rem 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    overflow: hidden;
}

#collection-view .collection-recipe-name,
#collection-view .collection-drink-name,
#collection-view .collection-snack-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: var(--bs-body-color);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.3rem;
}

/* Collection Item Meta */
#collection-view .collection-recipe-meta,
#collection-view .collection-drink-meta,
#collection-view .collection-snack-meta {
    margin: 0.3rem 0;
}

#collection-view .collection-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    justify-content: center;
}

#collection-view .collection-meta-item {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    color: var(--bs-secondary-color);
    background: var(--bs-light);
    padding: 0.2rem 0.4rem;
    border-radius: 15px;
    font-weight: 500;
    border: 1px solid var(--bs-border-color);
}

#collection-view .collection-meta-item i {
    font-size: 0.7rem;
    color: var(--bs-primary);
}

#collection-view .collection-meta-item.collection-time {
    background: rgba(var(--bs-info-rgb), 0.1);
    color: var(--bs-info);
    border-color: rgba(var(--bs-info-rgb), 0.2);
}

#collection-view .collection-meta-item.collection-servings {
    background: rgba(var(--bs-success-rgb), 0.1);
    color: var(--bs-success);
    border-color: rgba(var(--bs-success-rgb), 0.2);
}

#collection-view .collection-meta-item.collection-cuisine {
    background: rgba(var(--bs-warning-rgb), 0.1);
    color: var(--bs-warning-text-emphasis);
    border-color: rgba(var(--bs-warning-rgb), 0.2);
}

/* Collection Time Breakdown */
#collection-view .collection-time-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin: 0.3rem 0;
    justify-content: center;
}

#collection-view .collection-time-detail {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    color: var(--bs-secondary-color);
    background: var(--bs-light);
    padding: 0.15rem 0.3rem;
    border-radius: 10px;
    font-weight: 500;
    border: 1px solid var(--bs-border-color);
}

#collection-view .collection-time-detail i {
    font-size: 0.6rem;
    color: var(--bs-primary);
}

/* Nutrition Facts Header and Compact Pills */
#collection-view .collection-nutrition-section {
    margin: 0.4rem 0;
}

#collection-view .collection-nutrition-header {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--bs-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid var(--bs-border-color);
}

#collection-view .collection-nutrition-section .nutrition-pills {
    justify-content: center;
    gap: 0.3rem;
}

#collection-view .nutrition-pill {
    border-radius: 12px;
    transition: all 0.2s ease;
    border: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

#collection-view .nutrition-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

#collection-view .nutrition-pill i {
    font-size: 0.6rem;
    margin-right: 0.2rem;
}

/* Collection Tags Section */
#collection-view .collection-tags-section {
    margin: 0.4rem 0;
    flex-shrink: 0;
}

#collection-view .collection-recipe-tags,
#collection-view .collection-drink-tags,
#collection-view .collection-snack-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: center;
}

#collection-view .collection-tag-link {
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
    text-decoration: none;
    padding: 0.15rem 0.4rem;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
    border: 1px solid rgba(var(--bs-primary-rgb), 0.2);
}

#collection-view .collection-tag-link:hover {
    background: var(--bs-primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(var(--bs-primary-rgb), 0.3);
}

#collection-view .collection-tag-more {
    background: rgba(var(--bs-secondary-rgb), 0.1);
    color: var(--bs-secondary);
    padding: 0.15rem 0.4rem;
    border-radius: 12px;
    font-size: 0.6rem;
    font-weight: 600;
    border: 1px solid rgba(var(--bs-secondary-rgb), 0.2);
}

/* Collection Actions - Fixed at bottom */
#collection-view .collection-recipe-actions,
#collection-view .collection-drink-actions,
#collection-view .collection-snack-actions {
    margin-top: auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 1rem 1rem 1rem;
    border-top: 1px solid var(--bs-border-color);
}

#collection-view .collection-btn-details {
    background: var(--bs-primary);
    color: white;
    text-decoration: none;
    padding: 0.6rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 3px 12px rgba(var(--bs-primary-rgb), 0.3);
}

#collection-view .collection-btn-details:hover {
    background: var(--bs-primary-hover, #0d6efd);
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(var(--bs-primary-rgb), 0.4);
    color: white;
}

#collection-view .collection-btn-details i {
    margin-right: 0.3rem;
    font-size: 0.75rem;
}

#collection-view .collection-actions-secondary {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
}

#collection-view .collection-btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--bs-body-color);
}

#collection-view .collection-btn-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

#collection-view .collection-btn-edit {
    border-color: #ffc107;
    color: #ffc107;
}

#collection-view .collection-btn-edit:hover {
    background: #ffc107;
    color: white;
}

#collection-view .collection-btn-clone {
    border-color: #0dcaf0;
    color: #0dcaf0;
}

#collection-view .collection-btn-clone:hover {
    background: #0dcaf0;
    color: white;
}

#collection-view .collection-btn-add {
    border-color: #20c997;
    color: #20c997;
}

#collection-view .collection-btn-add:hover {
    background: #20c997;
    color: white;
}

/* Collection Swiper Navigation */
#collection-view .swiper-button-next.collection-swiper-nav,
#collection-view .swiper-button-prev.collection-swiper-nav {
    width: 40px;
    height: 40px;
    margin-top: -25px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid var(--bs-border-color);
}

#collection-view .swiper-button-next.collection-swiper-nav:hover,
#collection-view .swiper-button-prev.collection-swiper-nav:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

#collection-view .swiper-button-next.collection-swiper-nav:after,
#collection-view .swiper-button-prev.collection-swiper-nav:after {
    content: "";
}

#collection-view .swiper-button-next.collection-swiper-nav i,
#collection-view .swiper-button-prev.collection-swiper-nav i {
    color: var(--bs-primary);
    font-size: 1.2rem;
}

/* Collection Swiper Pagination */
#collection-view .swiper-pagination.collection-swiper-pagination {
    bottom: -40px !important;
}

#collection-view .swiper-pagination.collection-swiper-pagination .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(var(--bs-primary-rgb), 0.3);
    opacity: 1;
    transition: all 0.3s ease;
}

#collection-view .swiper-pagination.collection-swiper-pagination .swiper-pagination-bullet-active {
    background: var(--bs-primary);
    transform: scale(1.3);
}

/* Item highlighting for collection view */
#collection-view .collection-recipe-card.recipe-highlight,
#collection-view .collection-drink-card.drink-highlight,
#collection-view .collection-snack-card.snack-highlight {
    background: rgba(40, 167, 69, 0.05);
    border: 2px solid #28a745;
    box-shadow: 0 0 25px rgba(40, 167, 69, 0.3);
}

/* Swiper Navigation Position Fix */
.swiper-button-prev,
.swiper-rtl .swiper-button-next {
    left: var(--swiper-navigation-sides-offset, -40px) !important;
    right: auto;
}

.swiper-button-next,
.swiper-rtl .swiper-button-prev {
    right: var(--swiper-navigation-sides-offset, -40px) !important;
    left: auto;
}

/* Collection Ingredients Toggle Styling */
#collection-view .collection-ingredients-toggle {
    width: 100%;
    background: linear-gradient(135deg,
            rgba(var(--bs-primary-rgb), 0.05) 0%,
            rgba(var(--bs-primary-rgb), 0.02) 100%);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.15);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

#collection-view .collection-ingredients-toggle:hover {
    background: linear-gradient(135deg,
            rgba(var(--bs-primary-rgb), 0.1) 0%,
            rgba(var(--bs-primary-rgb), 0.05) 100%);
    border-color: rgba(var(--bs-primary-rgb), 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb), 0.15);
}

#collection-view .collection-ingredients-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.2);
}

#collection-view .collection-ingredients-toggle::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--bs-primary) 0%, var(--bs-info) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#collection-view .collection-ingredients-toggle:hover::before {
    opacity: 1;
}

#collection-view .ingredients-header {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    position: relative;
}

#collection-view .ingredients-title {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--bs-body-color);
    font-size: 0.9rem;
}

#collection-view .ingredients-title i {
    color: var(--bs-primary);
    font-size: 0.8rem;
}

#collection-view .ingredients-count {
    color: var(--bs-secondary);
    font-weight: 500;
    margin-left: 0.25rem;
}

#collection-view .ingredients-preview {
    display: flex;
    align-items: center;
    margin-left: 1.5rem;
}

#collection-view .first-ingredient {
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
    font-style: italic;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

#collection-view .toggle-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bs-primary);
    font-size: 0.8rem;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#collection-view .collection-ingredients-toggle[aria-expanded="true"] .toggle-icon {
    transform: translateY(-50%) rotate(180deg);
}

#collection-view .collection-ingredients-toggle[aria-expanded="true"] {
    background: linear-gradient(135deg,
            rgba(var(--bs-primary-rgb), 0.1) 0%,
            rgba(var(--bs-primary-rgb), 0.05) 100%);
    border-color: var(--bs-primary);
}

#collection-view .collection-ingredients-toggle[aria-expanded="true"] .ingredients-preview {
    opacity: 0.5;
}

#collection-view .ingredients-content {
    background: rgba(var(--bs-light-rgb), 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    margin-top: 0.5rem;
    border: 1px solid rgba(var(--bs-border-color-rgb), 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

#collection-view .ingredients-content .list-group-item {
    background: transparent;
    margin-bottom: 0.25rem;
    transition: background-color 0.2s ease;
    padding: 0.5rem 0.75rem;
}

#collection-view .ingredients-content .list-group-item:hover {
    background: rgba(var(--bs-primary-rgb), 0.05);
}

#collection-view .ingredients-content .list-group-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

#collection-view .ingredients-content .form-check-input:checked+.form-check-label {
    text-decoration: line-through;
    color: var(--bs-secondary-color);
    opacity: 0.6;
}

#collection-view .ingredients-content .ingredient-amount {
    color: var(--bs-primary);
    font-weight: 600;
    white-space: nowrap;
}

/* ===== MOBILE RESPONSIVENESS (SHARED) ===== */
@media (max-width: 768px) {

    .recipe-img,
    .drink-img,
    .snack-img {
        height: 150px;
    }

    .table-thumbnail {
        width: 40px;
        height: 40px;
    }

    .toggle-label {
        display: none;
    }

    .nutrition-circle {
        width: 60px;
        height: 60px;
        font-size: 0.9rem;
    }

    .swiper {
        width: 300px;
    }

    .recipe-name,
    .drink-name,
    .snack-name {
        font-size: 1.1rem;
    }

    .nutrition-item {
        padding: 4px 6px;
        font-size: 0.8rem;
    }

    .btn-recipe,
    .btn-drink,
    .btn-snack {
        font-size: 0.8rem;
        padding: 6px 10px;
    }

    .btn-edit,
    .btn-clone,
    .btn-add {
        width: 28px;
        height: 28px;
    }

    .swiper-slide {
        width: 240px;
        height: fit-content;
    }

    .view-toggle-container,
    .format-toggle-container,
    .nutrition-toggle-container {
        padding: 8px 10px;
        min-width: 100px;
        width: 100%;
    }

    .setting-label {
        font-size: 0.7rem;
        margin-bottom: 6px;
    }

    .toggle-label-mini {
        font-size: 0.6rem;
    }

    .toggle-track {
        width: 38px;
        height: 20px;
    }

    .toggle-thumb {
        width: 16px;
        height: 16px;
    }

    .toggle-track.active .toggle-thumb {
        transform: translateX(18px);
    }

    .progress-indicator.position-1 {
        left: 13.5%;
    }

    .progress-indicator.position-2 {
        left: 47.5%;
    }

    .progress-indicator.position-3 {
        left: 81.5%;
    }

    .collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .collection-img {
        height: 100px;
    }

    .collection-actions .btn {
        padding: 0.1rem 0.3rem;
        font-size: 0.7rem;
    }

    /* Collection view mobile adjustments */
    #collection-view .collection-recipes-container,
    #collection-view .collection-drinks-container,
    #collection-view .collection-snacks-container {
        padding: 1rem 0.5rem;
        gap: 3rem;
    }

    #collection-view .collection-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    #collection-view .collection-category-title {
        font-size: 1.5rem;
    }

    #collection-view .swiper {
        max-width: 320px;
    }

    #collection-view .swiper-slide {
        height: fit-content !important;
    }

    #collection-view .collection-recipe-header,
    #collection-view .collection-drink-header,
    #collection-view .collection-snack-header {
        height: 120px;
    }

    #collection-view .collection-recipe-content,
    #collection-view .collection-drink-content,
    #collection-view .collection-snack-content {
        padding: 0.8rem 0.8rem 0.6rem 0.8rem;
        gap: 0.5rem;
    }

    #collection-view .collection-recipe-name,
    #collection-view .collection-drink-name,
    #collection-view .collection-snack-name {
        font-size: 1rem;
        min-height: 2rem;
    }

    #collection-view .collection-meta-row {
        gap: 0.3rem;
    }

    #collection-view .collection-meta-item {
        font-size: 0.7rem;
        padding: 0.15rem 0.3rem;
    }

    #collection-view .collection-time-detail {
        font-size: 0.6rem;
        padding: 0.1rem 0.25rem;
    }

    #collection-view .nutrition-pill {
        font-size: 0.6rem;
        padding: 0.2rem 0.3rem;
    }

    #collection-view .collection-tag-link,
    #collection-view .collection-tag-more {
        font-size: 0.55rem;
        padding: 0.1rem 0.3rem;
    }

    #collection-view .collection-btn-details {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
    }

    #collection-view .collection-btn-icon {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    #collection-view .collection-swipe-instruction {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
        top: -2.5rem;
    }

    #collection-view .swiper-button-next.collection-swiper-nav,
    #collection-view .swiper-button-prev.collection-swiper-nav {
        width: 40px;
        height: 40px;
        margin-top: -20px;
    }

    #collection-view .swiper-button-next.collection-swiper-nav i,
    #collection-view .swiper-button-prev.collection-swiper-nav i {
        font-size: 1rem;
    }

    #collection-view .collection-ingredients-toggle {
        padding: 0.6rem 0.8rem;
    }

    #collection-view .ingredients-title {
        font-size: 0.85rem;
    }

    #collection-view .first-ingredient {
        font-size: 0.7rem;
        max-width: 120px;
    }

    #collection-view .ingredients-content {
        padding: 0.5rem;
    }
}

@media (max-width: 576px) {
    .collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .collection-img {
        height: 100px;
    }

    .collection-actions .btn {
        padding: 0.1rem 0.3rem;
        font-size: 0.7rem;
    }

    #collection-view .swiper {
        max-width: 280px;
    }

    #collection-view .swiper-slide {
        height: fit-content !important;
    }

    #collection-view .collection-recipe-header,
    #collection-view .collection-drink-header,
    #collection-view .collection-snack-header {
        height: 110px;
    }

    #collection-view .collection-swipe-instruction {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
        top: -3rem;
    }

    #collection-view .collection-swiper-container {
        margin-top: 1rem;
    }
}

@media (min-width: 992px) {
    .collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .collection-img {
        height: 140px;
    }
}

/* ===== DARK MODE SUPPORT (SHARED) ===== */
[data-bs-theme="dark"] .nutrition-progress-toggle:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .recipe-name-highlight,
[data-bs-theme="dark"] .drink-name-highlight,
[data-bs-theme="dark"] .snack-name-highlight {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .ingredients-list-compact {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .ingredient-row:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .popover {
    background-color: var(--bs-dark);
}

[data-bs-theme="dark"] .popover-header {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: var(--bs-light);
}

[data-bs-theme="dark"] .nutrition-popover-comprehensive .nutrition-value-card .card {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

[data-bs-theme="dark"] .nutrition-popover-comprehensive .alert-light {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--bs-light);
}

[data-bs-theme="dark"] .extra-ingredients-table {
    background-color: rgba(255, 255, 255, 0.03);
}

[data-bs-theme="dark"] .search-input-wrapper .form-control {
    background-color: rgba(33, 37, 41, 0.75);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .search-glass-btn {
    background: rgba(33, 37, 41, 0.75);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .search-glass-btn i {
    color: rgba(255, 255, 255, 0.85);
}

[data-bs-theme="dark"] .search-glass-btn:hover {
    background: rgba(33, 37, 41, 0.9);
}

[data-bs-theme="dark"] .recipe-card,
[data-bs-theme="dark"] .drink-card,
[data-bs-theme="dark"] .snack-card {
    background-color: var(--bs-dark-bg-subtle, #343a40);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .recipe-count,
[data-bs-theme="dark"] .drink-count,
[data-bs-theme="dark"] .snack-count {
    background-color: var(--bs-dark-bg-subtle, #343a40);
    color: var(--bs-light);
}

[data-bs-theme="dark"] .btn-edit {
    background-color: var(--bs-dark-bg-subtle, #343a40);
    color: var(--bs-light);
}

[data-bs-theme="dark"] .recipe-tag,
[data-bs-theme="dark"] .recipe-tag-more,
[data-bs-theme="dark"] .drink-tag,
[data-bs-theme="dark"] .drink-tag-more,
[data-bs-theme="dark"] .snack-tag,
[data-bs-theme="dark"] .snack-tag-more {
    background-color: var(--bs-dark-bg-subtle, #343a40);
    color: var(--bs-light);
}

[data-bs-theme="dark"] .view-toggle-container,
[data-bs-theme="dark"] .format-toggle-container,
[data-bs-theme="dark"] .nutrition-toggle-container {
    background: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .btn-group {
    background: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .toggle-track {
    background-color: rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] .progress-track {
    background-color: rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] .progress-indicator {
    border-color: var(--bs-dark);
}

/* Collection view dark mode */
[data-bs-theme="dark"] #collection-view .collection-recipe-card,
[data-bs-theme="dark"] #collection-view .collection-drink-card,
[data-bs-theme="dark"] #collection-view .collection-snack-card {
    background-color: var(--bs-dark-bg-subtle, #343a40);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] #collection-view .collection-recipe-count,
[data-bs-theme="dark"] #collection-view .collection-drink-count,
[data-bs-theme="dark"] #collection-view .collection-snack-count {
    background-color: var(--bs-primary);
}

[data-bs-theme="dark"] #collection-view .collection-btn-icon {
    background: var(--bs-dark-bg-subtle, #343a40);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--bs-light);
}

[data-bs-theme="dark"] #collection-view .collection-tag-link,
[data-bs-theme="dark"] #collection-view .collection-tag-more {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--bs-light);
}

[data-bs-theme="dark"] #collection-view .collection-meta-item,
[data-bs-theme="dark"] #collection-view .collection-time-detail {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--bs-light);
}

[data-bs-theme="dark"] #collection-view .swiper-button-next.collection-swiper-nav,
[data-bs-theme="dark"] #collection-view .swiper-button-prev.collection-swiper-nav {
    background: rgba(33, 37, 41, 0.95);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] #collection-view .collection-nutrition-header {
    color: var(--bs-light);
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] #collection-view .collection-swipe-instruction {
    background: rgba(var(--bs-primary-rgb), 0.9);
    border-color: var(--bs-primary);
    color: white;
}

[data-bs-theme="dark"] #collection-view .collection-ingredients-toggle {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.05) 0%,
            rgba(255, 255, 255, 0.02) 100%);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-bs-theme="dark"] #collection-view .collection-ingredients-toggle:hover {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(255, 255, 255, 0.05) 100%);
    border-color: rgba(255, 255, 255, 0.3);
}

[data-bs-theme="dark"] #collection-view .ingredients-content {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] #collection-view .ingredients-content .list-group-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* ===== SPECIFIC SEARCH INPUT ADJUSTMENTS PER FILE ===== */

/* From drinks.css - search input with larger height and padding-left */
.search-input-wrapper .form-control.drinks-search {
    padding-left: 2.5rem;
}

.search-glass-btn.drinks-search {
    width: 46px;
    height: 100%;
}

/* From snacks.css - search input with larger height and padding-left */
.search-input-wrapper .form-control.snacks-search {
    padding-left: 2.5rem;
}

.search-glass-btn.snacks-search {
    width: 46px;
    height: 100%;
}

/* ===== END OF UNIFIED CSS FILE ===== */