.gx-recipe-card {
    margin-top: 2rem;
    padding: 1.25rem;
    border: 1px solid #d9e0d2;
    border-radius: 12px;
    background: #f8fbf4;
}

.gx-recipe-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.gx-chip {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    border: 1px solid #b7c6aa;
    background: #eef5e6;
    font-size: 0.85rem;
}

.gx-chip-alert {
    border-color: #d2a6a6;
    background: #fff1f1;
    color: #8a2f2f;
}

.gx-chip-trend-rising {
    border-color: #86be90;
    background: #edf9ef;
    color: #256330;
}

.gx-chip-trend-stable {
    border-color: #bfd0af;
    background: #f4f9ef;
    color: #3f5a34;
}

.gx-chip-trend-cooling {
    border-color: #d7bf9b;
    background: #fff7ea;
    color: #7a5a2e;
}

.gx-servings-control {
    margin-bottom: 1rem;
}

.gx-servings-control input {
    width: 100px;
    margin-top: 0.25rem;
}

.gx-ingredients-table {
    width: 100%;
    border-collapse: collapse;
}

.gx-ingredients-table th,
.gx-ingredients-table td {
    border-bottom: 1px solid #d9e0d2;
    padding: 0.6rem;
    text-align: left;
}

.gx-related-recipes {
    margin-top: 1rem;
}

.gx-recipe-section {
    margin-top: 1.5rem;
}

.gx-steps-list {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
}

.gx-steps-list li + li {
    margin-top: 0.45rem;
}

.gx-nutrition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    margin: 0.75rem 0 0;
}

.gx-nutrition-grid div {
    padding: 0.75rem;
    border: 1px solid #d9e0d2;
    border-radius: 10px;
    background: #fff;
}

.gx-nutrition-grid dt {
    margin: 0;
    font-size: 0.85rem;
    color: #4a5d48;
}

.gx-nutrition-grid dd {
    margin: 0.3rem 0 0;
    font-size: 1rem;
    font-weight: 600;
}

.gx-nutrition-line {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.92rem;
    font-weight: 500;
}

.gx-lib-autocomplete-wrapper {
    position: relative;
}

.gx-lib-autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 20;
    margin: 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    box-shadow: 0 6px 14px rgba(2, 6, 23, 0.12);
    max-height: 220px;
    overflow-y: auto;
}

.gx-lib-autocomplete-item {
    margin: 0;
    padding: 8px 10px;
    cursor: pointer;
}

.gx-lib-autocomplete-item:hover {
    background: #f6f8fa;
}

.gx-lib-nutrition-row td {
    background: #fcfcfd;
}

.gx-lib-nutrition-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 8px;
}

.gx-lib-nutrition-grid label input {
    width: 100%;
}

.gx-lib-nutrition-note {
    margin: 8px 0 4px;
    color: #4b5563;
}

.gx-lib-feedback {
    min-height: 1.2em;
    color: #166534;
}

.gx-lib-feedback.is-error {
    color: #b91c1c;
}

.gx-category-dashicon-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.gx-category-dashicon-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    gap: 6px;
    max-width: 520px;
}

.gx-dashicon-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0;
    border-radius: 6px;
}

.gx-dashicon-option .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 18px;
}

.gx-dashicon-option.is-active {
    border-color: #1d4ed8;
    box-shadow: inset 0 0 0 1px #1d4ed8;
    background: #eff6ff;
}

.gx-category-badge-active-status {
    margin: 8px 0 6px;
    color: #1f2937;
    font-size: 12px;
    font-weight: 600;
}

.gx-category-badge-live-preview {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
}

.gx-category-badge-live-preview-label {
    color: #4b5563;
    font-size: 12px;
}

.gx-category-badge-live-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #ecfeff;
    color: #155e75;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #bae6fd;
}

.gx-category-badge-live-icon {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 14px;
}

.gx-category-badge-live-image {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    object-fit: cover;
    border: 1px solid #bae6fd;
}

.gx-category-badge-live-text {
    line-height: 1.1;
}

.gx-ingredient-info {
    display: inline-block;
    margin-left: 0.45rem;
    vertical-align: middle;
}

.gx-ingredient-info summary {
    list-style: none;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 999px;
    border: 1px solid #0f766e;
    color: #0f766e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}

.gx-ingredient-info summary::-webkit-details-marker {
    display: none;
}

.gx-ingredient-info div {
    margin-top: 0.35rem;
    max-width: 420px;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    background: #f0fdfa;
    color: #134e4a;
    font-size: 0.88rem;
    line-height: 1.35;
    box-shadow: 0 2px 6px rgba(15, 118, 110, 0.12);
}

.gx-info-readmore {
    margin-top: 0.25rem;
}

.gx-info-readmore summary {
    display: inline-block;
    color: #0f766e;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
}

.gx-info-readmore div {
    margin-top: 0.3rem;
    max-width: 540px;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 0.88rem;
    line-height: 1.35;
}

.gx-info-readmore-inline {
    margin-left: 0.35rem;
}

.gx-info-highlight-section {
    background: linear-gradient(140deg, #f0fdfa 0%, #ecfeff 100%);
    border: 1px solid #ccfbf1;
    border-radius: 12px;
    padding: 0.8rem 1rem;
}

.gx-info-highlight-list {
    margin: 0;
    padding-left: 1.15rem;
    display: grid;
    gap: 0.55rem;
}

.gx-info-highlight-list li {
    color: #134e4a;
}

.gx-nutrition-line strong {
    font-weight: 700;
}

.gx-related-recipes ul {
    margin: 0.5rem 0 0;
    padding-left: 1rem;
}

.gx-linked-list {
    margin: 0.75rem 0 0;
    padding-left: 1rem;
}

.gx-linked-list li + li {
    margin-top: 0.35rem;
}

.gx-grocery-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.gx-grocery-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0.8rem 0;
}

.gx-secondary-action {
    min-height: 38px;
    padding: 0.55rem 0.9rem;
    border: 1px solid #bfd0af;
    border-radius: 8px;
    background: #fff;
    color: #264029;
    cursor: pointer;
}

.gx-secondary-action:hover,
.gx-secondary-action:focus {
    background: #f0f6eb;
}

.gx-inline-note {
    margin-bottom: 0.65rem;
    color: #4a5d48;
    font-size: 0.92rem;
}

.gx-grocery-row.is-checked {
    opacity: 0.58;
}

.gx-grocery-row.is-checked td:not(:first-child) {
    text-decoration: line-through;
}

.gx-grocery-row.is-hidden-needed {
    display: none;
}

.gx-allergen-row {
    margin-top: 0.5rem;
}

.gx-blend-card .gx-recipe-section + .gx-recipe-section {
    margin-top: 1.25rem;
}

/* ── Empty state ────────────────────────────────────────────────── */
.gx-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2.5rem 1.5rem;
    border: 1px dashed #c8d5be;
    border-radius: 10px;
    background: #f6faf3;
    color: #5a7050;
}

.gx-empty-state-message {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.gx-empty-state-reset {
    display: inline-block;
    font-size: 0.875rem;
    color: #3d6b30;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gx-empty-state-reset:hover {
    color: #2a4f20;
}

.gx-finder {
    margin: 2rem 0;
    padding: 1rem;
    border: 1px solid #d9e0d2;
    border-radius: 12px;
    background: #f8fbf4;
}

.gx-archive-wrap {
    padding: 2rem 1rem 3rem;
}

.gx-archive-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.gx-archive-header {
    margin-bottom: 1.5rem;
}

.gx-context-card {
    margin-bottom: 1.25rem;
}

.gx-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4e6b46;
}

.gx-archive-header h1 {
    margin: 0 0 0.5rem;
}

.gx-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.gx-quick-chip {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #e3edd9;
    border: 1px solid #bfd0af;
    color: #264029;
    text-decoration: none;
}

.gx-quick-chip:hover,
.gx-quick-chip:focus {
    background: #d7e7c9;
}

.gx-finder-form {
    display: block;
}

.gx-filters-toggle {
    display: none;
    min-height: 38px;
    padding: 0.35rem 0.75rem;
    border: 1px solid #bfd0af;
    border-radius: 8px;
    background: #f4f8ee;
    color: #264029;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 0.8rem;
}

.gx-filters-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
    align-items: end;
}

.gx-field label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.gx-field input,
.gx-field select {
    width: 100%;
    min-height: 38px;
}

.gx-field-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.gx-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    padding: 0.45rem 0.5rem;
    border: 1px solid #d9e0d2;
    border-radius: 8px;
    background: #fff;
}

.gx-checkbox-option {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    font-size: 0.9rem;
}

.gx-checkbox-option input {
    margin: 0;
}

.gx-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.gx-actions button {
    min-height: 38px;
    padding: 0 1rem;
    border: 0;
    border-radius: 8px;
    background: #276128;
    color: #fff;
    cursor: pointer;
}

.gx-actions a {
    color: #2f4931;
}

@media (max-width: 640px) {
    .gx-archive-wrap {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .gx-filters-toggle {
        display: inline-flex;
        align-items: center;
    }

    .gx-filters-panel {
        display: none;
    }

    .gx-filters-panel.is-open {
        display: grid;
    }

    .gx-actions {
        flex-wrap: wrap;
    }

    .gx-grocery-actions {
        flex-direction: column;
    }

    .gx-secondary-action {
        width: 100%;
    }
}

@media print {
    body.gx-print-grocery .gx-grocery-actions,
    body.gx-print-grocery .gx-inline-note,
    body.gx-print-grocery .gx-servings-control,
    body.gx-print-grocery .gx-related-recipes,
    body.gx-print-grocery .gx-entry-aside,
    body.gx-print-grocery .gx-home-actions,
    body.gx-print-grocery header,
    body.gx-print-grocery footer {
        display: none !important;
    }

    body.gx-print-grocery .gx-grocery-row.is-checked {
        display: none;
    }

    body.gx-print-grocery .gx-recipe-card {
        border: 0;
        background: #fff;
        padding: 0;
    }
}

.gx-results-count {
    margin: 0.9rem 0;
}

.gx-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.85rem;
}

.gx-active-filters strong {
    font-size: 0.88rem;
    color: #2f4931;
}

.gx-active-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-height: 44px;
    padding: 0.28rem 0.62rem;
    border-radius: 999px;
    border: 1px solid #bfd0af;
    background: #eef5e6;
    color: #264029;
    text-decoration: none;
    font-size: 0.82rem;
}

.gx-active-filter-chip:hover,
.gx-active-filter-chip:focus {
    background: #e3edd9;
}

.gx-active-filter-chip-icon {
    width: 14px;
    height: 14px;
    font-size: 14px;
    line-height: 14px;
}

.gx-active-filter-chip-image {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    object-fit: cover;
    border: 1px solid #bfd0af;
}

.gx-active-filter-chip-label {
    line-height: 1.2;
}

.gx-active-filter-chip-remove {
    font-weight: 700;
    margin-left: 0.1rem;
}

@media (max-width: 768px) {
    .gx-active-filters {
        gap: 0.55rem;
    }

    .gx-active-filter-chip {
        padding: 0.35rem 0.75rem;
        font-size: 0.86rem;
    }

    .gx-category-dashicon-picker {
        grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
        max-width: 100%;
    }
}

.gx-recipe-grid {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.gx-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-top: 1rem;
}

.gx-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    padding: 0 0.65rem;
    border: 1px solid #bfd0af;
    border-radius: 8px;
    background: #fff;
    color: #2f4931;
    text-decoration: none;
}

.gx-page-link:hover,
.gx-page-link:focus {
    background: #f0f6eb;
}

.gx-page-link.is-current {
    background: #276128;
    border-color: #276128;
    color: #fff;
}

.gx-recipe-item {
    border: 1px solid #d9e0d2;
    border-radius: 10px;
    background: #fff;
    padding: 0.9rem;
}

.gx-recipe-item h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.gx-home-hero {
    padding: 1.5rem;
    border: 1px solid #d9e0d2;
    border-radius: 16px;
    background: linear-gradient(135deg, #f4faed 0%, #eef5e6 100%);
}

.gx-home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.gx-primary-link,
.gx-secondary-link {
    display: inline-block;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    text-decoration: none;
}

.gx-primary-link {
    background: #276128;
    color: #fff;
}

.gx-secondary-link {
    border: 1px solid #bfd0af;
    color: #264029;
    background: #fff;
}

.gx-home-section {
    margin-top: 1.5rem;
}

.gx-home-header {
    margin-bottom: 0.85rem;
}

.gx-home-header h3 {
    margin: 0 0 0.25rem;
}

.gx-home-header p {
    margin: 0;
}

.gx-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.gx-home-grid {
    display: grid;
    gap: 0.8rem;
}

.gx-home-grid-recipes {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.gx-home-grid-secondary {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.gx-simple-card {
    border: 1px solid #d9e0d2;
    border-radius: 10px;
    background: #fff;
    padding: 0.9rem;
}

.gx-simple-card h3 {
    margin: 0 0 0.5rem;
}

/* ============================================================
   Favorite button
   ============================================================ */

.gx-favorite-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0.75rem 0;
    padding: 0.45rem 1rem;
    background: #f9f4ef;
    color: #5a3e2b;
    border: 1.5px solid #d4a574;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.gx-favorite-btn:hover {
    background: #f0e8df;
    border-color: #b8804a;
}

.gx-favorite-btn.is-saved {
    background: #d4a574;
    color: #fff;
    border-color: #b8804a;
}

.gx-favorite-btn.is-saved:hover {
    background: #b8804a;
    border-color: #9a6635;
}

.gx-fav-count {
    color: #b8804a;

    .gx-results-region {
        position: relative;
    }

    .gx-results-region.is-loading {
        opacity: 0.55;
        transition: opacity 0.15s ease;
    }

    .gx-finder-error {
        margin: 0 0 0.8rem;
        padding: 0.6rem 0.75rem;
        border-radius: 8px;
        border: 1px solid #d67b7b;
        background: #fff1f1;
        color: #7a1f1f;
        font-size: 0.9rem;
    }
    font-weight: 600;
}
