/* Container Panel Structural Layout */
.panel-card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
    margin-bottom: 40px;
    margin-top: 20px;
}

.index-section-header {
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-border);
}

/* Parallel Grid System for Side-By-Side Filters */
.filter-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-column {
    flex: 1;
    min-width: 280px;
}

.filter-column label {
    font-weight: 700;
    font-size: 1.05rem;
    display: block;
    margin-bottom: 8px;
}

.filter-column-subtitle {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 2px 0 12px 0;
}

/* Custom utility for unified native selects */
select.form-input-unified {
    width: 100%;
    height: 42px;
    background-color: var(--color-bg-body);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 1rem;
    color: var(--color-text-dark);
    box-sizing: border-box;
    display: block;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Select2 container overrides */
html body .select2-container--default .select2-selection--single {
    width: 100%;
    height: 42px;
    background-color: var(--color-bg-body);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 1rem;
    color: var(--color-text-dark);
    box-sizing: border-box;
    display: block;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--color-text-dark);
    line-height: 24px;
    padding-left: 0;
    padding-right: 20px;
    width: 100%;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
    top: 1px;
    right: 10px;
}

select.form-input-unified:focus,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--color-primary-transparent, rgba(0, 123, 255, 0.15));
}

/* Ingredient Visual Tags Container Row */
.badge-row-container {
    margin-bottom: 24px;
}

.badge-row-container ul {
    list-style: none;
    padding: 0;
    margin: 0;
    min-height: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.badge-row-container li {
    padding: 6px 12px;
    font-size: 0.9rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--color-badge-blue-bg);
    color: var(--color-badge-blue-text);
    border: 1px solid var(--color-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.badge-row-container .remove-fridge-item {
    cursor: pointer;
    color: var(--color-text-muted);
    font-weight: 700;
}

/* Synchronized DataTable Row & Cell Styles */
.recipe-table-row {
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.recipe-table-row.row-even {
    background-color: var(--color-bg-alt, #f9f9f9);
}

.recipe-table-row:hover {
    background-color: var(--color-bg-hover, #f1f1f1);
}

td.table-title-cell {
    font-weight: 600;
    font-size: small;
}

td.table-description-cell {
    font-size: small;
}

.recipe-title-link {
    color: var(--color-primary, #0d6efd);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease-in-out;
}

.recipe-table-row:hover .recipe-title-link,
.recipe-title-link:hover,
.recipe-title-link:focus {
    color: var(--color-badge-blue-text, #0056b3);
    text-decoration: underline;
}

/* Interactive Table Badges (Chef & Category) */
.table-chef-badge,
.clickable-category-badge {
    cursor: pointer;
    display: inline-block;
    transition: all 0.15s ease-in-out;
}

.table-chef-badge:hover,
.clickable-category-badge:hover {
    filter: brightness(0.85);
    transform: scale(1.05);
}

.table-category-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    background-color: var(--color-bg-body);
    border: 1px solid var(--color-border);
    font-weight: 600;
}

.table-visibility-badge {
    padding: 4px 8px;
    font-size: 0.8rem;
    border-radius: 4px;
    background-color: var(--color-bg-disabled, #eee);
    color: var(--color-text-dark, #333);
}

/* Chef Active Filter Highlight: High-contrast amber yellow */
.table-chef-badge.filter-matching {
    background-color: var(--color-accent-secondary, #ffc107) !important;
    color: #1a1a1a !important;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transform: scale(1.02);
}

/* Category Active Filter Highlight: Subtle blueprint tint */
.clickable-category-badge.filter-matching {
    background-color: var(--color-badge-blue-bg, rgba(0, 123, 255, 0.12)) !important;
    color: var(--color-badge-blue-text, #0056b3) !important;
    border: 1px solid var(--color-badge-blue-text, #0056b3) !important;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Sign-in / Register Links */
.cookbook-signin-link {
    color: var(--color-primary, #007bff);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease-in-out;
}

.cookbook-signin-link:hover {
    color: var(--color-badge-blue-text, #0056b3);
    text-decoration: underline;
}

/* Layout Action Controls Bar */
.action-bar {
    margin-bottom: 1.5rem;
}

.btn-add-recipe {
    white-space: nowrap;
    width: 100%;
    max-width: 200px;
    text-align: center;
    padding: 10px 16px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    box-sizing: border-box;
}

/* System Notifications Wrapper Layouts */
.notifications-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.alert {
    padding: 14px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.alert--success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert--error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-icon {
    font-size: 1.1rem;
}

/* ==========================================================================
   COOKBOOK DIRECTORY CARDS & MODAL SECTIONS
   ========================================================================== */
.cookbook-section {
    margin-bottom: 32px;
}

.cookbook-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.cookbook-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.cookbook-card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 18px 20px;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.cookbook-card:hover {
    border-color: var(--color-primary, #0d6efd);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.cookbook-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.cookbook-card-title {
    margin: 0;
    font-size: 1.15rem;
    color: var(--color-text-dark);
}

.cookbook-card-desc {
    margin: 0;
    font-size: 0.92rem;
    color: var(--color-text-muted);
    line-height: 1.45;
}

.cookbook-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
    padding-top: 10px;
}

.cookbook-danger-zone {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
}

.visibility-pill--not-public {
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    font-size: 0.75rem;
    margin-left: 6px;
    cursor: help;
}

.table-responsive-wrapper.is-loading {
    opacity: 0.5;
    transition: opacity 0.15s ease;
}

/* ==========================================================================
   SHARE COOKBOOK MODAL COLLABORATOR LIST ALIGNMENT
   ========================================================================== */
#shareCookbookModal .pool-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    min-height: 44px;
    border-bottom: 1px solid var(--color-border);
}

#shareCookbookModal .pool-item-row:last-of-type {
    border-bottom: none;
}

#shareCookbookModal .pool-item-row > div {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

#shareCookbookModal .pool-item-row form {
    margin: 0;
    flex-shrink: 0;
}

/* ==========================================================================
   PERSONAL RECIPE TRY-STATUS PILL BADGES
   ========================================================================== */
.try-status-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.try-status-pill--try-again {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.try-status-pill--not-tried {
    background-color: #f5f5f4;
    color: #57534e;
    border: 1px solid #e7e5e4;
}

.try-status-pill--not-again {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
