/**
 * Public extensions catalog — portal palette.
 * Outer: full-bleed like changelog (escapes narrow .entry-content).
 * Inner max width aligned with typical theme content (1270px); keep in sync with product-changelog.css.
 * Modal: .yoopxl-ext-catalog-modal* (popup is appended to body).
 */

/* ——— Root: full viewport band + side padding (same idea as .yoopxl-changelog-wrap) ——— */
.yoopxl-extensions-catalog-wrap {
    --yp-text: #5a5a59;
    --yoo-gray-600: #64748b;
    --yoo-gray-100: #e5e7eb;
    --yoo-primary: #eeb44e;
    --yoo-primary-dark: #c58a2b;
    color: var(--yp-text);
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: 2em;
    margin-bottom: 2em;
    padding-left: clamp(16px, 4vw, 48px);
    padding-right: clamp(16px, 4vw, 48px);
    box-sizing: border-box;
    position: relative;
}

/* Inner: same cap as .yoopxl-changelog-section (product-changelog.css) */
.yoopxl-extensions-catalog-wrap .yoopxl-catalog-inner {
    width: 100%;
    max-width: min(1270px, 100%);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* ——— Header / toolbar: one row on wide screens, icons visible (dashicons style enqueued) ——— */
.yoopxl-extensions-catalog-wrap .yp-store-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px 24px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--yoo-gray-100);
}

@media (min-width: 900px) {
    .yoopxl-extensions-catalog-wrap .yp-store-header {
        flex-wrap: nowrap;
        align-items: center;
    }
}

.yoopxl-extensions-catalog-wrap .yp-store-header-content {
    flex: 1;
    min-width: 0;
}

.yoopxl-extensions-catalog-wrap .yp-store-title {
    color: var(--yp-text);
    font-weight: 600;
}

.yoopxl-extensions-catalog-wrap .yp-store-title .dashicons {
    color: var(--yoo-primary) !important;
    font-size: 28px;
    width: 32px;
    height: 32px;
    line-height: 32px;
    flex-shrink: 0;
}

.yoopxl-extensions-catalog-wrap .yp-store-subtitle {
    color: var(--yoo-gray-600);
    margin: 0;
    padding-inline-start: 38px;
    line-height: 1.5;
}

.yoopxl-extensions-catalog-wrap .yp-store-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 0 !important;
    padding: 0 !important;
    flex-shrink: 0;
}

@media (min-width: 600px) {
    .yoopxl-extensions-catalog-wrap .yp-store-toolbar {
        flex-wrap: nowrap;
    }
}

.yoopxl-extensions-catalog-wrap .yp-store-search {
    position: relative;
    width: min(100%, 220px);
    flex: 0 0 auto;
}

.yoopxl-extensions-catalog-wrap .yp-store-search .dashicons {
    position: absolute;
    inset-inline-start: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--yoo-gray-600);
    font-size: 18px;
    width: 18px;
    height: 18px;
    z-index: 1;
    pointer-events: none;
}

.yoopxl-extensions-catalog-wrap .yp-store-search input[type="search"],
.yoopxl-extensions-catalog-wrap .yp-store-search input {
    width: 100%;
    padding: 8px 12px;
    padding-inline-start: 36px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: var(--yp-text);
    background: #fff;
    box-sizing: border-box;
}

.yoopxl-extensions-catalog-wrap .yp-store-search input:focus {
    border-color: var(--yoo-primary);
    outline: none;
    box-shadow: 0 0 0 1px rgba(238, 180, 78, 0.35);
}

.yoopxl-extensions-catalog-wrap .yp-store-filter-wrapper {
    width: min(100%, 220px);
    min-width: 140px;
    flex: 0 0 auto;
}

.yoopxl-extensions-catalog-wrap .yp-store-license-filter-wrapper {
    width: min(100%, 240px);
    min-width: 160px;
    flex: 0 0 auto;
}

.yoopxl-extensions-catalog-wrap select.yp-store-filter,
.yoopxl-extensions-catalog-wrap .yp-store-filter {
    width: 100%;
    padding: 8px 32px 8px 12px;
    border: 1px solid #d1d5db !important;
    border-radius: 8px;
    font-size: 14px;
    color: var(--yp-text);
    background-color: #fff !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="5" viewBox="0 0 10 5"><path fill="%2364748b" d="M0 0l5 5 5-5z"/></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
}

.yoopxl-extensions-catalog-wrap .yp-store-toolbar .button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    white-space: nowrap;
    height: auto;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: var(--yp-text);
    font-size: 14px;
    line-height: 1.4;
}

.yoopxl-extensions-catalog-wrap .yp-store-toolbar .button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: var(--yoo-primary-dark);
}

.yoopxl-extensions-catalog-wrap .yp-store-toolbar .button:hover {
    border-color: var(--yoo-primary);
    color: var(--yp-text);
}

/* ——— Grid ——— */
.yoopxl-extensions-catalog-wrap .yp-extensions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 18px;
}

@media (max-width: 600px) {
    .yoopxl-extensions-catalog-wrap .yp-extensions-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

/* ——— Mobile / narrow: stack toolbar, full-width controls ——— */
@media (max-width: 782px) {
    .yoopxl-extensions-catalog-wrap {
        margin-top: 1.25em;
        margin-bottom: 1.5em;
    }

    .yoopxl-extensions-catalog-wrap .yp-store-header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .yoopxl-extensions-catalog-wrap .yp-store-toolbar {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .yoopxl-extensions-catalog-wrap .yp-store-search,
    .yoopxl-extensions-catalog-wrap .yp-store-filter-wrapper,
    .yoopxl-extensions-catalog-wrap .yp-store-license-filter-wrapper {
        width: 100% !important;
        max-width: none !important;
    }

    .yoopxl-extensions-catalog-wrap .yp-store-toolbar .button {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        box-sizing: border-box;
    }

    .yoopxl-extensions-catalog-wrap .yp-store-title {
        font-size: clamp(1.15rem, 4.5vw, 1.4rem);
    }
}

.yoopxl-extensions-catalog-wrap .yp-extension-card {
    background: #fff;
    border: 1px solid #ede8dc;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 2px 14px rgba(15, 23, 42, 0.06);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

/* Soft “skin” hover — overrides Extended store (dark border + heavy shadow) */
.yoopxl-extensions-catalog-wrap .yp-extension-card:hover {
    border-color: #e8d9c8 !important;
    box-shadow: 0 6px 20px rgba(180, 140, 90, 0.09) !important;
    background-color: #fffefb !important;
}

.yoopxl-extensions-catalog-wrap .yp-ext-header {
    margin-bottom: 0;
}

/*
 * Thumbnail: full graphic inside the card (Extended default overlays tags on the image — we pull tags below).
 */
.yoopxl-extensions-catalog-wrap .yp-extension-card .yp-ext-icon {
    width: 100%;
    height: 200px;
    margin-bottom: 0 !important;
    box-sizing: border-box;
    border-radius: 14px 14px 0 0;
    background: linear-gradient(165deg, #faf9f7 0%, #f0ece4 100%);
    border-bottom: 1px solid #f0ece4;
}

.yoopxl-extensions-catalog-wrap .yp-extension-card img.yp-ext-icon {
    display: block;
    object-fit: contain !important;
    object-position: center !important;
    padding: 20px 22px;
    width: 100%;
    height: 200px !important;
    max-height: 200px !important;
    box-sizing: border-box;
}

.yoopxl-extensions-catalog-wrap .yp-extension-card .yp-ext-icon:not(img) {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    height: 200px;
}

/* Tags: NOT on top of the image — row under the thumbnail with spacing (overrides Extended absolute) */
.yoopxl-extensions-catalog-wrap .yp-ext-tags {
    position: static !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    width: 100%;
    margin: 0;
    padding: 12px 14px 10px;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    z-index: 1;
    justify-content: flex-start;
}

html[dir="rtl"] .yoopxl-extensions-catalog-wrap .yp-ext-tags {
    justify-content: flex-end;
}

.yoopxl-extensions-catalog-wrap .yp-ext-header .yp-ext-tags {
    padding: 6px 0 6px 0;
}

.yoopxl-extensions-catalog-wrap .yp-ext-description {
    padding: 10px 16px 8px;
    font-size: 13px;
    color: var(--yoo-gray-600);
    line-height: 1.45;
    min-height: 0;
    margin-bottom: 0;
}

.yoopxl-extensions-catalog-wrap .yp-ext-card-footer {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 16px 14px;
    margin-top: auto;
    border-top: 1px solid #f0ece4;
    flex-wrap: wrap;
}

.yoopxl-extensions-catalog-wrap .yp-ext-card-footer__ver {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
    font-size: 13px;
    color: var(--yoo-gray-600);
}

.yoopxl-extensions-catalog-wrap .yp-ext-card-footer__ver .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: var(--yoo-gray-600);
}

.yoopxl-extensions-catalog-wrap .yp-ext-card-footer__dl {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-inline-start: 10px;
}

.yoopxl-extensions-catalog-wrap .yp-ext-version {
    color: var(--yp-text);
    font-weight: 600;
}

.yoopxl-extensions-catalog-wrap .yp-ext-details {
    background: none;
    border: none;
    color: var(--yoo-primary-dark);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    padding: 0;
}

.yoopxl-extensions-catalog-wrap .yp-ext-details:hover {
    text-decoration: underline;
}

.yoopxl-extensions-catalog-wrap .yp-ext-author {
    color: var(--yoo-gray-600);
}

.yoopxl-extensions-catalog-wrap .yp-ext-author-name {
    color: var(--yoo-primary-dark);
}

.yoopxl-extensions-catalog-wrap .yp-ext-title {
    color: var(--yp-text);
    margin: 0;
    line-height: 1.35;
}

.yoopxl-extensions-catalog-wrap .yp-ext-title-open {
    display: inline;
    max-width: 100%;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--yp-text);
    cursor: pointer;
    text-align: inherit;
    line-height: inherit;
}

.yoopxl-extensions-catalog-wrap .yp-ext-title-open:hover,
.yoopxl-extensions-catalog-wrap .yp-ext-title-open:focus-visible {
    color: var(--yoo-primary-dark);
    text-decoration: underline;
    outline: none;
}

/* Hide placeholder rating row on public catalog (was empty / noisy) */
.yoopxl-extensions-catalog-wrap .yp-ext-rating {
    display: none !important;
}

/* ——— Fallback-only: legacy selectors when Extended CSS missing ——— */
.yoopxl-extensions-catalog-wrap .yp-ext-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Public catalog: “paid-only” (replaces confusing “not included” for anonymous visitors) */
.yoopxl-extensions-catalog-wrap .yp-ext-tag.tag-paid-catalog,
.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .tag-badge.tag-paid-catalog {
    background: #fff8e8;
    color: #9a6700;
    border: 1px solid rgba(238, 180, 78, 0.45);
    text-transform: none;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Loading: same spinner as portal license modal (.yoo-lic-detail-spinner in licenses.css) */
.yoopxl-extensions-catalog-wrap .yoopxl-ext-catalog-loading {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 56px 24px;
    min-height: 180px;
    box-sizing: border-box;
}

.yoopxl-extensions-catalog-wrap .yoopxl-ext-catalog-spinner {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3px solid #e5e7eb;
    border-top-color: #eeb44e;
    box-sizing: border-box;
    animation: yoopxl-ext-catalog-spin 0.75s linear infinite;
    flex-shrink: 0;
}

@keyframes yoopxl-ext-catalog-spin {
    to {
        transform: rotate(360deg);
    }
}

.yoopxl-extensions-catalog-wrap .yoopxl-ext-catalog-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.yoopxl-extensions-catalog-wrap .yp-extensions-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--yoo-gray-600);
}

/* ——— Modal appended to <body> (portal / changelog–like) ——— */
body.yoopxl-ext-modal-open {
    overflow: hidden !important;
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px))
        max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
    background: rgba(0, 0, 0, 0.45);
    z-index: 100000;
    box-sizing: border-box;
}

.yp-ext-popup.yoopxl-ext-catalog-modal-box {
    position: relative;
    border-radius: 14px;
    max-width: min(560px, calc(100vw - 24px));
    width: 100%;
    max-height: min(90vh, 880px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-header {
    border-bottom: 1px solid #f0ece4;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-banner {
    width: 100%;
    height: 140px;
    max-height: 140px;
    object-fit: contain;
    object-position: center;
    display: block;
    padding: 12px 20px;
    margin: 0;
    box-sizing: border-box;
    background: linear-gradient(165deg, #faf9f7 0%, #f0ece4 100%);
    flex-shrink: 0;
}

/* Space between banner and text (was “stuck”) */
.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-title-wrapper {
    padding: 18px 20px 12px;
    text-align: start;
}

html[dir="rtl"] .yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-title-wrapper {
    text-align: right;
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-title h2 {
    margin: 0 0 8px;
    font-size: clamp(1.1rem, 3.5vw, 1.25rem);
    font-weight: 600;
    color: #5a5a59;
    line-height: 1.35;
    text-align: inherit;
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-title .yp-ext-author {
    text-align: inherit;
}

/* Tags (Premium / Paid only) — breathing room from title + banner zone */
.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-tags {
    margin-top: 14px;
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 14px 22px 22px;
    -webkit-overflow-scrolling: touch;
    text-align: start;
}

html[dir="rtl"] .yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-body {
    text-align: right;
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-meta {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0ece4;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    align-items: center;
    text-align: start;
    justify-content: flex-start;
}

html[dir="rtl"] .yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-meta {
    text-align: right;
    justify-content: flex-end;
}

/* Modal body sections — one column, same alignment for Description / License / variants */
.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yoopxl-ext-popup-section {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    text-align: start;
}

html[dir="rtl"] .yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yoopxl-ext-popup-section {
    text-align: right;
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yoopxl-ext-popup-section + .yoopxl-ext-popup-section {
    margin-top: 22px;
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yoopxl-ext-popup-section__body {
    width: 100%;
    box-sizing: border-box;
    text-align: start;
}

html[dir="rtl"] .yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yoopxl-ext-popup-section__body {
    text-align: right;
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yoopxl-ext-popup-section h3,
.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-changelog h3 {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: start;
    width: 100%;
}

html[dir="rtl"] .yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yoopxl-ext-popup-section h3,
html[dir="rtl"] .yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-changelog h3 {
    text-align: right;
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-description {
    margin-bottom: 0;
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-description .yoopxl-ext-popup-section__body p {
    margin: 0;
    color: #5a5a59;
    line-height: 1.65;
    font-size: 14px;
    text-align: start;
}

html[dir="rtl"] .yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-description .yoopxl-ext-popup-section__body p {
    text-align: right;
}

/* Own card — clearly separate from changelog / scroll area (was read as “inside” banner) */
.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-variants-section {
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-variants-section .yp-variant-item {
    background: #f8fafc;
}

/* License block after changelog (no adjacent .yoopxl-ext-popup-section chain) */
.yp-ext-popup-overlay.yoopxl-ext-catalog-modal #yp-ext-changelog-container + .yp-ext-popup-tags-info {
    margin-top: 22px;
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal #yp-ext-changelog-container:not(:empty) {
    margin-top: 22px;
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
    padding: 16px 22px;
    background: #f9f9f8;
    border-top: 1px solid #f0ece4;
}

html[dir="rtl"] .yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-footer {
    justify-content: center;
}

/* Match login page .yoopxl-close-modal — flat circle, gold hover */
.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-close {
    position: absolute;
    top: 16px;
    inset-inline-end: 16px;
    z-index: 10;
    width: 40px;
    height: 40px;
    border: none;
    padding: 0;
    color: #718096;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-close:hover,
.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-close:focus-visible {
    color: #fff;
    background: #eeb44e;
    transform: rotate(90deg);
    box-shadow: 0 4px 12px rgba(238, 180, 78, 0.3);
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-close .dashicons {
    font-family: dashicons !important;
    font-size: 22px;
    width: 22px;
    height: 22px;
    line-height: 1;
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-variant-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
    background: #fafafa;
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-variant-header h4 {
    margin: 0;
    font-size: 15px;
    color: #5a5a59;
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-tags-info {
    text-align: start;
}

html[dir="rtl"] .yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-tags-info {
    text-align: right;
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-tags-info .yp-tags-explanation {
    margin: 0;
    padding-inline-start: 1.25em;
    color: #5a5a59;
    font-size: 14px;
    line-height: 1.65;
    text-align: start;
}

html[dir="rtl"] .yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-tags-info .yp-tags-explanation {
    text-align: right;
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-tags {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
}

html[dir="rtl"] .yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-tags {
    justify-content: flex-end;
}

/* Footer actions — flat portal-style (no gradient / heavy 3D) */
.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yoopxl-ext-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    min-height: 42px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.25;
    box-sizing: border-box;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    box-shadow: none !important;
    transform: none !important;
    text-shadow: none !important;
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yoopxl-ext-modal-btn--ghost {
    background: transparent !important;
    border: 1px solid #d1d5db !important;
    color: #6b7280 !important;
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yoopxl-ext-modal-btn--ghost:hover,
.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yoopxl-ext-modal-btn--ghost:focus {
    border-color: #9ca3af !important;
    color: #374151 !important;
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yoopxl-ext-modal-btn--primary {
    background: #eeb44e !important;
    border: 1px solid #eeb44e !important;
    color: #fff !important;
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yoopxl-ext-modal-btn--primary:hover,
.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yoopxl-ext-modal-btn--primary:focus {
    background: #d9a341 !important;
    border-color: #d9a341 !important;
    color: #fff !important;
}

.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-footer a.yoopxl-ext-modal-btn--primary,
.yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-footer a.yoopxl-ext-modal-btn--primary:visited {
    color: #fff !important;
}

@media (max-width: 600px) {
    .yp-ext-popup.yoopxl-ext-catalog-modal-box {
        max-width: calc(100vw - 16px);
        max-height: min(92vh, 900px);
        border-radius: 12px;
    }

    .yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-title-wrapper {
        padding: 16px 16px 10px;
    }

    .yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-body {
        padding: 12px 16px 18px;
    }

    .yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-footer {
        flex-direction: column-reverse;
        align-items: center;
        justify-content: center;
    }

    .yp-ext-popup-overlay.yoopxl-ext-catalog-modal .yp-ext-popup-footer .yoopxl-ext-modal-btn {
        width: 100%;
        max-width: 320px;
        text-align: center;
        justify-content: center;
        min-height: 44px;
        box-sizing: border-box;
    }
}
