/* * File: style.css
 * Version: 2.21
 * Updates: 
 * - v2.21: Added character counter indicators.
 * - v2.20: Added storage breakdown bar and legend styles.
 * - v2.19: Enhanced sticky positioning for silo ads.
 * - v2.18: Updated ad-silo styling for production ads.
 */
:root {
    --primary: #ff6b6b;
    --secondary: #4ecdc4;
    --dark: #2d3436;
    --light: #f7f1e3;
    --white: #ffffff;
    --radius: 8px;
    --danger: #dc3545;
    --success: #28a745;
    --warning: #ffc107;
    --info: #17a2b8;
    --purple: #6c5ce7;
    --orange: #d97706;
    --grey-light: #e9ecef;
    --grey-text: #495057;
    --border-color: #ddd;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light);
    background-image: url('public/images/background.svg');
    background-repeat: repeat;
    color: var(--dark);
    margin: 0;
    line-height: 1.6;
}

/* --- Layout & Utilities --- */
.container { max-width: 1400px; margin: 0 auto 2rem; padding: 0 1rem; }
main.container { margin-top: 0; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-danger { color: var(--danger); }
.text-purple { color: var(--purple); }
.text-orange { color: var(--orange); }
.text-muted { color: #666; }
.text-italic { font-style: italic; }
.text-caption { font-size: 0.8em; color: #666; }
.text-xs { font-size: 0.7em; }
.text-sm { font-size: 0.9em; }

.char-counter {
    font-size: 0.75em;
    color: #999;
}

.char-counter.warning {
    color: var(--orange);
    font-weight: bold;
}

.char-counter.danger {
    color: var(--danger);
    font-weight: bold;
}

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.p-40 { padding: 40px; }
.w-100 { width: 100%; box-sizing: border-box; }
.flex-1 { flex: 1; }
.opacity-60 { opacity: 0.6; }

/* --- Storage Breakdown --- */
.storage-breakdown-bar {
    display: flex;
    height: 24px;
    width: 100%;
    background: #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.storage-segment {
    height: 100%;
    transition: width 0.3s ease;
}

.storage-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.9em;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-info {
    display: flex;
    justify-content: space-between;
    flex-grow: 1;
}

.legend-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.legend-size {
    color: #666;
    font-variant-numeric: tabular-nums;
}

.toolbar {
    background: #f8f9fa;
    padding: 15px;
    border-radius: var(--radius);
    border: 2px solid #dee2e6;
}

/* Search Bar Enhancements */
.search-input-wrapper {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.search-input-wrapper input[type="search"] {
    padding-right: 45px; /* Space for clear button */
}

/* Hide default browser clear button */
.search-input-wrapper input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.search-clear-btn {
    position: absolute;
    right: 5px;
    background: none;
    border: none;
    color: #999;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    display: none; /* Hidden unless .visible */
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: color 0.2s, transform 0.1s;
    border-radius: 50%;
    z-index: 5;
}

.search-clear-btn:hover {
    color: var(--primary);
}

.search-clear-btn:active {
    transform: scale(0.9);
}

.search-clear-btn.visible {
    display: flex;
}

/* Flex Utilities */
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-gap-5 { display: flex; gap: 5px; }
.flex-gap-10 { display: flex; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.align-end { align-items: flex-end; }
.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.flex-align-center-gap5 { display: flex; align-items: center; gap: 5px; }

/* Text Truncation for Flex Items */
.text-truncate-flex {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Grid Layouts */
.grid-2col { display: grid; gap: 20px; }
/* Fix for grid blowout: Ensure direct children can shrink */
.grid-2col > * { min-width: 0; }

/* Specific Grid Ratios */
.grid-view { grid-template-columns: 1fr 2fr; gap: 30px; }

/* Force Editor Grid: Ingredients (50%) | Directions (50%) - Perfectly balanced */
.grid-editor { grid-template-columns: 1fr 1fr !important; } 

.grid-admin { grid-template-columns: 3fr 1fr; }
.grid-profile { grid-template-columns: 1fr 1fr; max-width: 1100px; margin: 0 auto; }
.grid-user-edit { grid-template-columns: 2fr 1fr; }

/* Grid View V2 (Column Wrapper Layout) */
.grid-view-v2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    align-items: start;
}

/* Tightly packed columns */
.view-col-1, .view-col-2 {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Clean up old grid positioning */
.view-ingredients, .view-info, .view-docs, .view-directions, .view-gallery {
    grid-column: auto;
    grid-row: auto;
}

.main-content-wrapper {
    background: #e9ecef;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 2px solid #dee2e6;
}

/* Remove gap and adjust appearance for tab integration on desktop */
@media (min-width: 769px) {
    main.container { padding-top: 0; }
    .main-content-wrapper {
        border-top: 1px solid #adb5bd; /* Slightly thinner top border to match tabs */
    }
}

/* Navbar */
.navbar {
    background-color: var(--light);
    background-image: url('public/images/background.svg');
    background-repeat: repeat;
    padding: 0.8rem 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid #dee2e6;
}

@media (min-width: 769px) {
    .navbar {
        border-bottom: none;
        box-shadow: none; /* Remove shadow to prevent floating look on desktop */
    }
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    flex-wrap: wrap;
    gap: 10px;
}

.brand { font-size: 1.5rem; font-weight: bold; color: var(--primary); text-decoration: none; margin-right: 15px; }

.nav-links { display: flex; align-items: center; gap: 10px; }
.nav-greeting { margin-right: auto; font-weight: bold; color: #555; font-size: 1.1rem; }
.nav-pending { color: #666; margin-right: 15px; font-style: italic; }

/* FAB (Floating Action Button) for Mobile */
.fab-add-recipe {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    z-index: 999;
    text-decoration: none;
    font-size: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}
.fab-add-recipe:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
    color: white;
}
.fab-add-recipe:active {
    transform: scale(0.95);
}

/* Navbar Button Standardize */
.nav-links .nav-btn {
    text-decoration: none;
    color: var(--dark);
    padding: 8px 16px !important;
    border-radius: 6px;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
    font-size: 0.95rem !important;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    height: 38px !important;
    box-sizing: border-box;
    white-space: nowrap;
}
.nav-links .nav-btn:hover { 
    background-color: #f1f3f5; 
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.nav-links .nav-btn.active { 
    background-color: #e9ecef; 
    border-color: #adb5bd;
    color: var(--dark);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

/* Primary Nav Button (Desktop New Recipe) */
.nav-links .nav-btn.btn-primary {
    background-color: var(--primary);
    color: white;
    border: 1px solid var(--primary);
}
.nav-links .nav-btn.btn-primary:hover {
    background-color: #ff5252;
    border-color: #ff5252;
    color: white;
}

.nav-links .nav-btn.btn-warning { 
    background-color: #fff3cd; 
    color: #856404; 
    border-color: #ffeeba; 
}
.nav-links .nav-btn.btn-warning:hover {
    background-color: #ffeeba;
}
.nav-links .nav-btn.btn-warning.active { 
    background-color: #ffc107; 
    color: #000; 
    border-color: #e0a800;
}

.nav-links .nav-btn.btn-logout { 
    background-color: transparent; 
    border: 1px solid transparent; 
    color: #666; 
}
.nav-links .nav-btn.btn-logout:hover { 
    background-color: #fff5f5; 
    border-color: #feb2b2;
    color: #c53030; 
}

/* --- Desktop Physical Tab Styling --- */
@media (min-width: 769px) {
    .navbar {
        align-items: flex-end; /* Align items to bottom for tab effect */
        padding-bottom: 0;
    }

    .navbar .container {
        flex-direction: column;
        align-items: center;
        padding-bottom: 0;
        gap: 5px;
    }
    
    .brand {
        padding-bottom: 0; 
        margin-right: 0;
        font-size: 1.8rem;
    }

    .nav-greeting {
        padding-bottom: 5px; 
        text-align: center;
        width: auto;
        margin-right: 0;
    }

    .nav-links {
        gap: 4px; /* Gap for tabs */
        align-items: flex-end;
        justify-content: center;
        width: 100%;
        height: 100%;
        margin-bottom: -2px; /* Push down to overlap border */
    }

    .nav-links .nav-btn {
        border-radius: 10px 10px 0 0 !important; /* Top rounded only */
        border: 1px solid #c0c0c0;
        border-bottom: none;
        background: linear-gradient(to bottom, #fdfbf7, #eceae5); /* Beveled, paper-like gradient */
        box-shadow: 
            inset 1px 1px 0 rgba(255,255,255,0.7), /* Highlight */
            -1px 0 2px rgba(0,0,0,0.05), /* Subtle depth */
            1px 0 2px rgba(0,0,0,0.05);
        color: #555;
        height: 44px !important;
        padding: 10px 24px !important;
        margin-bottom: 0;
        position: relative;
        z-index: 1;
        transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
        transform-origin: bottom;
        font-family: 'Segoe UI', sans-serif;
        font-weight: 600;
        text-shadow: 0 1px 0 rgba(255,255,255,0.9);
        flex-grow: 0;
    }

    /* Hover State: Lift up */
    .nav-links .nav-btn:hover {
        background: linear-gradient(to bottom, #ffffff, #f1efe9);
        transform: translateY(-3px);
        z-index: 5;
        box-shadow: 
            0 -3px 6px rgba(0,0,0,0.08),
            inset 1px 1px 0 rgba(255,255,255,0.8);
        color: var(--primary);
        border-color: #b0b0b0;
    }

    /* Active State: Distinct, Darker as requested, Connected */
    .nav-links .nav-btn.active {
        background: #e9ecef; /* Distinct darker shade */
        color: var(--dark);
        border: 1px solid #999; /* More pronounced border */
        border-bottom: 2px solid #e9ecef; /* Mask the navbar line with same color */
        height: 48px !important; /* Taller to pop */
        z-index: 10;
        transform: translateY(0); /* Sits firmly */
        box-shadow: none; 
        margin-bottom: -2px; /* Ensure overlap */
    }

    /* Standardize Trash Tab Border */
    .nav-links .nav-btn.btn-warning {
        border-color: #c0c0c0;
    }
    .nav-links .nav-btn.btn-warning.active {
        border-color: #999;
    }

    /* Logout Tab Styling */
    .nav-links .nav-btn.btn-logout {
        color: var(--danger) !important; /* Red text */
        border: 1px solid #c0c0c0;
        border-bottom: none;
        background: linear-gradient(to bottom, #fff5f5, #ffebee); /* Subtle red tint */
        height: 44px !important;
        margin-bottom: 0;
        border-radius: 10px 10px 0 0 !important;
    }
    .nav-links .nav-btn.btn-logout i {
        color: var(--danger); /* Red icon */
    }
    .nav-links .nav-btn.btn-logout:hover {
        background: linear-gradient(to bottom, #ffebee, #ffdada);
        transform: translateY(-3px);
        color: #b91c1c !important;
    }

    /* New Recipe Tab Styling (Green) */
    .nav-links .nav-btn.nav-btn-new-recipe {
        color: var(--success) !important;
        border: 1px solid var(--success);
        border-bottom: none;
        background: linear-gradient(to bottom, #f0fff4, #dcffe4); /* Subtle green tint */
        height: 44px !important;
        margin-bottom: 0;
        border-radius: 10px 10px 0 0 !important;
        text-shadow: none;
    }
    .nav-links .nav-btn.nav-btn-new-recipe i {
        color: var(--success);
    }
    .nav-links .nav-btn.nav-btn-new-recipe:hover {
        background: linear-gradient(to bottom, #dcffe4, #c6f6d5);
        transform: translateY(-3px);
    }
    .nav-links .nav-btn.nav-btn-new-recipe.active {
        background: #e9ecef;
        border-color: #999;
        border-bottom: 2px solid #e9ecef;
    }

    /* Adjust remaining Primary buttons (like Save) to keep their rounded look */
    .nav-links .nav-btn.btn-primary:not(.nav-btn-new-recipe) {
        background: linear-gradient(to bottom, #ff8fa3, #ff6b6b);
        color: white;
        border-color: #e04f5f;
        text-shadow: 0 1px 0 rgba(0,0,0,0.1);
        border-bottom: 1px solid #d63030; 
        border-radius: 8px !important;
        margin-bottom: 5px; 
        height: 38px !important;
    }
}

/* Responsive Visibility */
/* Default: FAB Hidden, Nav Button Visible */
.fab-add-recipe { display: none; }
.nav-btn-new-recipe { display: inline-flex; }

/* Mobile (< 768px): Show FAB, Hide Nav Button */
@media (max-width: 768px) {
    /* .fab-add-recipe { display: flex; } */
    /* .nav-btn-new-recipe { display: none !important; } */
    
    /* Adjust FAB position to not overlap with potential toast/scroll-top */
    .fab-add-recipe { bottom: 20px; right: 20px; }
}

/* Recipe Grid & Cards */
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }

.recipe-card {
    background: #f8f9fa;
    border-radius: var(--radius);
    border: 2px solid #dee2e6;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    cursor: pointer;
}
.recipe-card:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); border-color: var(--primary); }
.recipe-card.no-hover { cursor: default; transform: none; box-shadow: none; height: auto; padding: 20px; }

.recipe-img { height: 180px; background-size: cover; background-position: center; position: relative; }
.recipe-content { padding: 15px; }
.recipe-content h3 { text-align: center; margin-top: 0; }
.category-tag { background: var(--secondary); color: white; padding: 3px 8px; border-radius: 20px; font-size: 0.8rem; }

/* View Page specific */
.view-container { max-width: 1200px; margin: 0 auto; }
.recipe-header { position: relative; height: 300px; background-size: cover; background-position: center; border-radius: 8px; margin-bottom: 20px; }
.recipe-header h1 { position: absolute; bottom: 20px; left: 20px; background: rgba(255,255,255,0.9); padding: 10px 20px; border-radius: 4px; margin: 0; }
.recipe-meta-badges { font-size: 0.9em; color: #555; }
.section-header { border-bottom: 2px solid var(--primary); padding-bottom: 5px; margin-top: 0; }
.ing-list { padding-left: 20px; margin: 0; }
.ing-list li { margin-bottom: 5px; }
.doc-list { list-style: none; padding: 0; }
.doc-list li { margin: 5px 0; }
.instruction-block { white-space: pre-wrap; line-height: 1.8; }

/* Forms & Inputs */
.profile-card, .card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 2px solid #dee2e6;
}

.editor-container {
    background: #e9ecef;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 2px solid #dee2e6;
}

/* Auth Pages Styling */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 20px 0;
}

.auth-card { 
    width: 100%;
    max-width: 420px; 
    margin: 0 auto; 
    background: #f8f9fa;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08), 0 5px 15px rgba(0,0,0,0.05);
    border: 2px solid #dee2e6;
}

.login-icon-circle {
    width: 90px;
    height: 90px;
    background: #fff0f0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

.input-lg {
    padding: 14px;
    font-size: 1.05rem;
    background: #fdfdfd;
}
.input-lg:focus {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
    border-color: var(--primary);
}
.editor-container { max-width: 800px; margin: 0 auto; }
.profile-card { max-width: 100%; }
.card-banned { border: 1px solid var(--danger); text-align: center; }
.card-danger-zone { border: 1px solid #f5c6cb; background: #fff5f5; }

.input-group-row { display: flex; gap: 10px; margin-bottom: 15px; }
.input-group-col { flex: 1; }
.form-label-sm { font-size: 0.9em; display: block; margin-bottom: 5px; font-weight: 500; }

.editor-fieldset { border: 1px solid var(--border-color); padding: 15px; margin: 10px 0; border-radius: 8px; }
.editor-fieldset legend { padding: 0 10px; font-weight: bold; }

input, select, textarea {
    width: 100%; padding: 10px; margin: 5px 0 15px;
    border: 1px solid var(--border-color); border-radius: 4px; box-sizing: border-box;
}

/* Custom Input Styles */
.input-compact { padding: 5px; margin: 0; }
.input-inline-grow { margin: 0; flex-grow: 1; }
.input-h38 { margin: 0; height: 38px; }
.input-full-margin0 { margin: 0; width: 100%; }
.input-highlight-blue { border: 1px solid #0d47a1; padding: 8px; }
.select-compact { margin: 0; padding: 5px; font-size: 0.9em; }
.select-auto { margin: 0; width: auto; }

.form-row { display: flex; gap: 20px; }
.col { flex: 1; }

/* Buttons */
button, .btn-primary {
    background: var(--primary); color: white; border: none; padding: 10px 20px;
    border-radius: 4px; cursor: pointer; text-decoration: none; display: inline-block;
    font-size: 1rem;
}
.btn-block { display: block; width: 100%; box-sizing: border-box; }
.btn-sm { padding: 5px 12px; font-size: 0.9rem; }
.btn-text { background: none; color: #666; text-decoration: underline; cursor: pointer; border: none; padding: 0; }
.btn-secondary { background: #6c757d; color: white; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn-icon { 
    background: transparent !important; 
    border: none; 
    padding: 5px; 
    cursor: pointer; 
    font-size: 1.2rem;
    color: #666; /* Default color */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
.btn-icon.text-info { color: var(--info) !important; }
.btn-icon.text-primary { color: var(--primary) !important; }
.btn-icon:hover { transform: scale(1.1); }

/* Custom Button Variants */
.btn-success { background-color: var(--success); color: white; }
.btn-success:hover { background-color: #218838; }
.btn-info { background-color: var(--info); color: white; border: none; display: flex; align-items: center; gap: 5px; }
.btn-info:hover { background-color: #138496; }
.btn-disabled { background: #e9ecef; color: #999; border: 1px solid #ddd; cursor: not-allowed; display: flex; align-items: center; gap: 5px; }
.btn-purple { background-color: var(--purple); color: white; }
.btn-purple:hover { background-color: #5b4cc4; }
.btn-warning-dark { background: #e0a800; border: none; color: white; }
.btn-warning-dark:hover { background: #c69500; }
.btn-lg-custom { padding: 15px; font-size: 1.2em; }
.block-center-mt15 { display: block; text-align: center; margin-top: 15px; }

.btn-danger-block {
    display: block; width: 100%; padding: 12px; 
    background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; 
    border-radius: 8px; text-align: center; font-weight: bold; font-size: 1rem; 
    margin-top: 15px; cursor: pointer; box-sizing: border-box;
    text-decoration: none;
}
.btn-danger-block:hover { background: #ffcdd2; }
.btn-danger { background-color: var(--danger); color: white; }
.btn-danger:hover { background-color: #bd2130; }

/* Disabled button states */
button:disabled,
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled,
.btn-sm:disabled {
    background: #e9ecef !important;
    color: #999 !important;
    border: 1px solid #ddd !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}
button:disabled:hover,
.btn-primary:disabled:hover,
.btn-secondary:disabled:hover,
.btn-danger:disabled:hover {
    background: #e9ecef !important;
    color: #999 !important;
}

/* Alerts & Badges */
.alert { background: #d4edda; color: #155724; padding: 10px; margin-bottom: 20px; border-radius: 4px; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border-color: #f5c6cb; }

/* Custom Alerts */
.alert-info-custom { background-color: #e3f2fd; border-color: #90caf9; color: #0d47a1; }
.alert-secondary-custom { background-color: #e2e3e5; color: #383d41; border-color: #d6d8db; }
.alert-warning-custom { background-color: #fff3cd; color: #856404; border-color: #ffeeba; }
.alert-info-box { background: #e3f2fd; padding: 15px; border-radius: 8px; border: 1px solid #90caf9; margin: 20px 0; }
.alert-list { margin: 5px 0 0 20px; }

.badge { background: #eee; padding: 4px 8px; border-radius: 4px; font-size: 0.8em; margin-right: 5px; display: inline-block; }
.badge-primary { background: #e3f2fd; color: #0d47a1; }
.badge-success { background: var(--success); color: white; }
.badge-danger { background: red; color: white; }
.badge-warning { background: #fd7e14; color: white; }
.badge-secondary { background: var(--grey-light); color: var(--grey-text); }
.badge-secondary-dark { background-color: #6c757d; color: white; }
.badge-light { background-color: #f8f9fa; color: #495057; border: 1px solid #ddd; }
.badge-pending { background: orange; color: white; }
.badge-public { background: #fff3cd; color: #856404; }

/* Profile Specific Layouts */
.profile-section-header { font-size: 1.2em; font-weight: 600; margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 10px; color: var(--dark); }

.storage-widget { background: #f8f9fa; border-radius: 4px; padding: 15px; border: 1px solid #eee; }
.storage-track { background: #e9ecef; border-radius: 4px; height: 10px; width: 100%; overflow: hidden; margin-top: 5px; margin-bottom: 5px; }
.storage-fill { background: var(--success); height: 100%; transition: width 0.5s ease; }
.storage-stats { font-size: 0.85em; color: #666; display: flex; justify-content: space-between; }

.family-list { list-style: none; padding: 0; margin: 0; }
.family-item { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px; background: #fff; border-bottom: 1px solid #eee; }
.family-item:last-child { border-bottom: none; }
.family-role { font-size: 0.85em; color: #666; margin-left: 5px; }

.cat-list { list-style: none; padding: 0; max-height: 250px; overflow-y: auto; margin-bottom: 15px; border: 1px solid #eee; border-radius: 4px; }
.cat-item { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; padding: 10px; background: #fff; }
.cat-item:last-child { border-bottom: none; }
.system-cats { margin-top: 15px; padding-top: 15px; border-top: 1px solid #eee; }
.sys-cat-badge { background: #e9ecef; color: #495057; display: inline-block; margin: 3px; padding: 4px 10px; border-radius: 15px; font-size: 0.85em; }

.email-readonly { background-color: #f8f9fa; color: #666; cursor: not-allowed; border-color: #eee; }
.email-help-text { font-size: 0.8em; color: var(--info); margin-top: -10px; margin-bottom: 15px; display: flex; align-items: center; gap: 5px; }

.verify-container { text-align: center; max-width: 500px; margin: 0 auto; }
.verify-icon { color: var(--primary); margin-bottom: 20px; font-size: 4em; }
.verify-email-box { background: #f8f9fa; padding: 15px; border-radius: 8px; margin: 20px 0; border: 1px solid #eee; font-weight: bold; }

/* Footer */
.main-footer { text-align: center; margin-top: 50px; padding: 20px; color: #666; font-size: 0.9em; border-top: 1px solid #eee; }

/* Scanner */
.scanner-area { 
    background: #e3f2fd; padding: 20px; 
    border: 2px dashed #2196f3; border-radius: 8px; 
    text-align: center; margin-bottom: 20px; cursor: pointer; 
    transition: all 0.3s ease; 
}
.scanner-area:hover { background: #bbdefb; border-color: #1976d2; }
.scanner-subtitle { font-size: 0.9em; margin-top: -10px; }
.scan-status-text { font-weight: 500; font-size: 0.9em; display: block; }

#scanQueue { text-align: left; margin-top: 15px; border-top: 1px solid #bbdefb; padding-top: 10px; }
.queue-item {
    display: flex; justify-content: space-between; align-items: center;
    background: #fff; padding: 8px 12px; margin-bottom: 5px;
    border-radius: 4px; font-size: 0.9em; box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.remove-file-btn { background: none; border: none; color: #dc3545; font-weight: bold; cursor: pointer; padding: 0 5px; font-size: 1.2em; }

/* --- EDITOR & MEDIA STYLES --- */
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.media-col { display: flex; flex-direction: column; }
.media-preview-item { margin-top:5px; border-bottom:1px solid #eee; padding:8px 5px; background:#fff; display:flex; align-items:center; justify-content: space-between; font-size: 0.9em; }
.media-preview-item:last-child { border-bottom: none; }
.mini-thumb { width:40px; height:40px; object-fit:cover; border-radius:4px; margin-right:8px; }
.no-media { font-size: 0.8em; color: #aaa; font-style: italic; padding: 10px; text-align: center; }

.existing-media-box { 
    background: #f9f9f9; border: 1px solid #eee; border-radius: 4px; 
    border-top: none; padding: 5px; max-height: 200px; overflow-y: auto; 
    border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; 
}

.media-upload-area { 
    background: #f8f9fa; padding: 15px; 
    border: 2px dashed #ccc; border-radius: 6px; 
    text-align: center; cursor: pointer; transition: 0.2s; 
    height: 160px; display: flex; flex-direction: column; 
    justify-content: center; align-items: center;
    border-bottom-left-radius: 0; border-bottom-right-radius: 0; 
}
.media-upload-area:hover { background: #eee; border-color: #999; }
.media-upload-area i { color: #666; margin-bottom: 5px; }

.delete-btn-mobile { background-color: transparent; border: none; color: #dc3545; font-size: 1.2em; padding: 5px 10px; cursor: pointer; transition: color 0.2s; }
.delete-btn-mobile:hover { color: #bd2130; background-color: #ffeef0; border-radius: 4px; }

.file-selected-text { color: var(--success); font-size: 0.85em; font-weight: bold; margin-top: 5px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-top: 10px; }
.gallery-grid img { width: 100%; height: 100px; object-fit: cover; border-radius: 4px; cursor: pointer; }

/* --- INGREDIENT EDITOR STYLES (Fixed v2.10) --- */
.ing-row {
    display: flex;
    align-items: center;
    gap: 5px; /* Tighter gap */
    margin-bottom: 10px;
    width: 100%;
    box-sizing: border-box;
}

/* Override general input width:100% and margins */
.ing-row input, 
.ing-row select {
    margin-bottom: 0;
    padding: 6px; /* Compact padding */
    height: 38px;
    min-width: 0; /* CRITICAL: Allows flex items to shrink below their content size */
    box-sizing: border-box;
}

/* * Compact Quantity Input
 * 50px is roughly enough for "1.5" or "1/4" without wasting space.
 * flex: 0 0 50px ensures it stays this width and doesn't grow/shrink unexpectedly.
 */
.ing-qty {
    flex: 0 0 50px;
    width: 50px; 
    text-align: center;
    padding: 6px 2px !important;
}

/* * Auto-width Unit Dropdown
 * width: auto lets the browser size it to the widest option (e.g., "Tablespoon").
 * flex: 0 0 auto ensures it only takes necessary space.
 */
.ing-unit {
    flex: 0 0 auto;
    width: auto;
    padding: 6px 5px !important; /* Slightly more padding for clickability */
}

/* Name field fills remaining space robustly */
.ing-name {
    flex: 1 1 0; /* Grow, Shrink, Basis 0 - Best for filling space */
    width: 0; /* Standard flex trick to ensure it behaves */
    min-width: 0; 
}

.ing-row .btn-text {
    flex: 0 0 30px; /* Fixed space for delete button */
    color: var(--danger);
    font-size: 1.5rem;
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Desktop Adjustments: Only gap increases, sizing remains compact */
@media (min-width: 768px) {
    .ing-row { gap: 10px; }
}

/* Toast Notification */
#undo-toast { 
    visibility: hidden; min-width: 250px; background-color: #333; color: #fff; 
    text-align: center; border-radius: 4px; padding: 12px; position: fixed; 
    z-index: 1000; left: 50%; bottom: 30px; transform: translateX(-50%); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); display: flex; justify-content: space-between; 
    align-items: center; font-size: 0.9em; 
}
#undo-toast.show { visibility: visible; animation: fadein 0.5s; }
#undo-toast button { background: none; border: none; color: #4dabf7; font-weight: bold; cursor: pointer; margin-left: 15px; text-transform: uppercase; }

/* Cropper Modal */
#cropperModal { 
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.85); 
    align-items: center !important; 
    justify-content: center !important; 
    overflow: hidden; 
}

.crop-container { 
    background-color: #fff; 
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%; 
    max-width: 800px; 
    max-height: 90vh; 
    border-radius: 8px; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    border: 2px solid #dee2e6;
}

.crop-body { 
    flex-grow: 1; 
    background: #333; 
    position: relative;
    height: 60vh;
    min-height: 300px;
    overflow: hidden;
    border-bottom: 2px solid #dee2e6;
}

/* --- CropperJS Mobile Enhancements --- */
.cropper-view-box {
    outline: 2px solid var(--primary);
    outline-color: rgba(255, 107, 107, 0.75);
}
.cropper-line { background-color: var(--primary); }
.cropper-point {
    width: 12px !important;
    height: 12px !important;
    background-color: var(--primary);
    opacity: 1;
}
/* Larger hit area for handles on mobile */
@media (max-width: 768px) {
    .cropper-point {
        width: 24px !important;
        height: 24px !important;
    }
}

.crop-controls { 
    padding: 15px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: #fff; 
    border-top: 1px solid #eee;
    flex-shrink: 0; /* Prevent controls from squishing */
}

/* Mobile adjustments */
@media (max-height: 600px) {
    .crop-body { height: 50vh; min-height: 200px; }
}

.img-container img { max-width: 100%; }

/* Toggle Card & Slider */
label.toggle-card {
    background: white; border: 1px solid #ccc; border-radius: 8px; padding: 15px;
    display: flex; justify-content: space-between; align-items: center; cursor: pointer; margin-bottom: 10px;
}
label.toggle-card:hover { background: #f9f9f9; }

.switch { position: relative; display: inline-block; width: 60px; height: 34px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 26px; width: 26px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #2196F3; }
input:checked + .slider:before { transform: translateX(26px); }

.link-copy-box { display: flex; gap: 5px; margin-top: 5px; }
.link-copy-box input { flex-grow: 1; background: #fff; border: 1px solid #ccc; padding: 8px; border-radius: 4px; }

/* Admin Tables */
table { width: 100%; border-collapse: collapse; margin-top: 20px; }
th, td { padding: 12px; border-bottom: 1px solid #ddd; text-align: left; }
th { background-color: #f8f9fa; }
.thead-light { background: #f1f3f5; }
.table-sm { font-size: 0.9em; }
.table-empty-state { text-align: center; padding: 20px; color: #999; }

.list-unstyled-sm { list-style: none; padding: 0; font-size: 0.9em; line-height: 1.8; }

.card-header-actions { padding: 15px; background: #f8f9fa; border-bottom: 1px solid #eee; display: flex; gap: 10px; }

.loader { display: none; margin-left: 10px; }
@keyframes fadein { from {bottom: 0; opacity: 0;} to {bottom: 30px; opacity: 1;} }

/* Mobile Response */
@media (max-width: 768px) {
    .navbar { transition: transform 0.3s ease; }
    
    /* Hide on Scroll Down */
    body.scroll-down .navbar { transform: translateY(-100%); }
    body.scroll-down .sticky-toolbar { transform: translateY(-200%); }

    .media-grid { grid-template-columns: 1fr; } 
    .grid-view, .grid-editor, .grid-admin, .grid-profile, .grid-user-edit { display: block !important; }
    .grid-2col { display: block; }
    .recipe-header { height: 200px; }
    
    .navbar .container { flex-direction: column; align-items: stretch; }
    .brand { margin-bottom: 10px; text-align: center; margin-right: 0; }
    .nav-links { justify-content: center; flex-wrap: wrap; }
    .nav-btn { flex-grow: 1; justify-content: center; padding: 10px; }
    .nav-greeting { width: 100%; text-align: center; margin-right: 0; margin-bottom: 5px; }
    
    .view-container .toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
    .view-container .toolbar > div { width: 100%; display: flex; justify-content: space-between; }
    
    .search-form { flex-direction: column; align-items: stretch; }
    .search-form select { width: 100% !important; }
    
    .search-clear-btn {
        right: 2px;
        padding: 12px; /* Larger touch target */
        font-size: 1.4rem;
    }

    /* Mobile Stack Utility */
    .mobile-stack { flex-direction: column; gap: 10px; }
    .mobile-stack > * { width: 100%; text-align: center; }

    /* Container Padding Adjustments */
    .main-content-wrapper { padding: 1rem; }
    .profile-card, .card { padding: 1.2rem; }

    /* Form Row Stacking */
    .form-row, .input-group-row { flex-direction: column; gap: 0; }
    .form-row > .col, .input-group-row > .input-group-col { width: 100%; flex: auto !important; margin-bottom: 15px; }

    /* Reorder View V2 on Mobile */
    .grid-view-v2 {
        display: flex !important;
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }
    .grid-view-v2 > * { width: 100%; }
    .view-col-1, .view-col-2 {
        display: contents; /* Unwrap columns */
    }
    .view-ingredients { order: 1; }
    .view-directions { order: 2; }
    .view-info { order: 3; }
    .view-gallery { order: 4; }
    .view-docs { order: 5; }
}

/* Family Badge Overlay */
.family-badge {
    position: absolute; top: 10px; right: 10px;
    background: rgba(40, 167, 69, 0.9); color: white;
    padding: 5px 10px; border-radius: 20px;
    font-size: 0.75rem; font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 5;
}

.owner-badge {
    position: absolute; top: 10px; left: 10px;
    background: rgba(23, 162, 184, 0.9); color: white;
    padding: 5px 10px; border-radius: 20px;
    font-size: 0.75rem; font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 5;
}

/* Toast Notification Container */
#toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    pointer-events: none;
}

#toast-container > * {
    pointer-events: auto;
}

/* Toast Message Style */
.toast-message {
    background-color: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 4px;
    margin-bottom: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    animation: slideUp 0.3s ease-out;
}

/* Toast Animation Keyframes */
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideDown {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(20px); opacity: 0; }
}

/* Scanner Loading State */
.scanner-area.scanning {
    background: #f3e8ff !important;
    border-color: #9333ea !important;
    cursor: wait;
}

.scanner-area.scanning::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(147, 51, 234, 0.1), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Lightbox Modal (New v2.12) */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevents background scrolling */
    background-color: rgba(0,0,0,0.9);
    cursor: zoom-out; /* Indicates clicking background closes it */
    
    /* Centering */
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    margin: auto;
    display: block;
    width: auto;
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    animation-name: zoom;
    animation-duration: 0.3s;
}

.lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000;
    
    /* Touch Target & Visibility Improvements */
    width: 60px;
    height: 60px;
    line-height: 55px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    cursor: pointer;
}

@keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}

/* --- Drag & Drop Ingredients --- */
.ing-row {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent; /* Prevent jump on drag */
    border-radius: 4px;
}

.ing-row.over {
    border: 2px dashed var(--primary);
    background-color: rgba(255, 107, 107, 0.1);
    transform: scale(1.02);
}

.drag-handle {
    cursor: grab;
    color: #aaa;
    padding: 0 10px;
    display: flex;
    align-items: center;
    font-size: 1.2em;
}

.drag-handle:hover {
    color: var(--dark);
}

.ing-header-row {
    background-color: #546e7a; /* Blue Grey for distinct separator */
    padding: 8px 15px;
    border-radius: 4px;
    margin-top: 20px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Input inside the header bar */
.ing-header-input {
    background: transparent !important;
    border: none !important;
    color: white !important;
    font-weight: 600;
    font-size: 1.1em;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
}

.ing-header-input::placeholder {
    color: rgba(255,255,255, 0.6);
    font-weight: normal;
}

.ing-header-input:focus {
    outline: none;
    background: transparent !important;
}

/* Adjust controls inside header row */
.ing-header-row .btn-text {
    color: rgba(255,255,255,0.9) !important;
}
.ing-header-row .btn-text:hover {
    color: #ff6b6b !important; /* Red on hover */
}
.ing-header-row .drag-handle {
    color: rgba(255,255,255, 0.5) !important;
}
.ing-header-row .drag-handle:hover {
    color: white !important;
}

/* View Page Section Header */
.ing-section-header {
    background-color: #f1f3f5;
    color: #495057;
    padding: 8px 12px;
    margin-top: 15px;
    margin-bottom: 5px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1.05em;
    border-left: 4px solid var(--primary);
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}
.ing-section-header:hover {
    background-color: #e9ecef;
}

.sticky-toolbar {
    position: sticky;
    top: var(--navbar-height, 80px);
    z-index: 90;
    transition: top 0.3s ease, transform 0.3s ease;
}

/* --- Recipe Rating Styles --- */
.rating-symbol { font-size: 1.2em; margin-right: 2px; line-height: 1; user-select: none; }
.rating-symbol.gold { color: #ffd700; text-shadow: 0 1px 2px rgba(0,0,0,0.3); } /* Gold */
.rating-symbol.grey { color: #e0e0e0; }
.rating-symbol:hover { transform: scale(1.1); transition: transform 0.1s; }

.tile-rating {
    white-space: nowrap;
    margin-left: 10px;
    flex-shrink: 0;
}
.tile-rating .rating-symbol { font-size: 0.9em; text-shadow: none; }

.rating-box { margin-bottom: 10px; }
.rating-stars { display: inline-block; margin-left: 10px; }

/* Scroll To Top Button */
#scrollToTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--primary);
    color: white;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    
    /* Hidden State */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

#scrollToTopBtn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#scrollToTopBtn:hover {
    background-color: var(--dark);
    transform: translateY(-3px);
}

/* Admin User Editor Styles */
.user-edit-stack { display: flex; flex-direction: column; gap: 20px; }
.status-item { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.status-item:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.dashed-divider { border-top: 1px dashed #eee; padding-top: 5px; margin-top: 5px; }
.mono-sm { font-family: monospace; font-size: 0.9em; }
.history-container { max-height: 400px; overflow-y: auto; }
.email-warning-text { font-size: 0.85em; color: #555; margin-bottom: 10px; line-height: 1.4; }
.email-warning-header { margin-top: 0; color: #0d47a1; margin-bottom: 10px; }
.email-label { color: #0d47a1; font-weight: bold; }
/* --- Gallery Carousel & Lightbox --- */
.gallery-carousel-container {
    position: relative;
    display: flex;
    align-items: center;
}

.gallery-carousel {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; 
    -ms-overflow-style: none;
    padding: 10px 5px;
    width: 100%;
}
.gallery-carousel::-webkit-scrollbar { 
    display: none; 
}

.gallery-img {
    height: 250px;
    width: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    object-fit: cover;
}
.gallery-img:hover {
    transform: scale(1.02);
}

.carousel-control {
    background: rgba(255,255,255,0.7);
    color: #333;
    border: 1px solid #ddd;
    padding: 0;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s;
    position: absolute;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.carousel-control:hover {
    background: #fff;
    transform: scale(1.1);
}
.carousel-control.prev { left: -15px; }
.carousel-control.next { right: -15px; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-img { height: 200px; }
    .carousel-control.prev { left: 0; }
    .carousel-control.next { right: 0; }
}


/* --- ADVERTISING SCHEME --- */
.dashboard-ad-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    width: 100%;
}

.dashboard-content {
    flex: 1;
    min-width: 0; /* Prevent flex blowout */
}

.ad-silo {
    width: 160px;
    background: transparent;
    border: none;
    display: block;
    text-align: center;
    padding: 0;
    min-height: 600px;
    position: sticky;
    top: 90px;
    flex-shrink: 0;
    align-self: flex-start;
    z-index: 90;
}

.ad-tile {
    background: #e9ecef;
    border: 1px dashed #ced4da;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #6c757d;
    padding: 20px;
    min-height: 280px; /* Match recipe card height roughly */
    position: relative;
    cursor: default;
}

.ad-label {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dee2e6;
    color: #495057;
    font-size: 0.7em;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
}

.ad-label-silo {
    display: block;
    text-align: center;
    font-size: 0.7em;
    color: #999;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-weight: bold;
}

.ad-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Hide Silos ONLY on Portrait Mobile/Small Devices */
@media (max-width: 900px) and (orientation: portrait) {
    .ad-silo {
        display: none;
    }
}

