/* Extensions catalog view */

/* Local FA subset lacks plug-circle-plus — provide glyph via SVG mask fallback */
.fas.fa-plug-circle-plus,
.fa-solid.fa-plug-circle-plus {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3E%3Cpath fill='black' d='M96 0C78.3 0 64 14.3 64 32v96h64V32c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32v96h64V32c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32v32c0 77.4 55 142 128 156.8V480c0 17.7 14.3 32 32 32s32-14.3 32-32V412.8c12.3-2.5 24.1-6.4 35.1-11.5c-2.1-10.8-3.1-21.9-3.1-33.3c0-80.3 53.8-148 127.3-169.2c.5-2.2 .7-4.5 .7-6.8c0-17.7-14.3-32-32-32H32zM432 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm16-208v48h48c8.8 0 16 7.2 16 16s-7.2 16-16 16H448v48c0 8.8-7.2 16-16 16s-16-7.2-16-16V384H368c-8.8 0-16-7.2-16-16s7.2-16 16-16h48V304c0-8.8 7.2-16 16-16s16 7.2 16 16z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3E%3Cpath fill='black' d='M96 0C78.3 0 64 14.3 64 32v96h64V32c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32v96h64V32c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32v32c0 77.4 55 142 128 156.8V480c0 17.7 14.3 32 32 32s32-14.3 32-32V412.8c12.3-2.5 24.1-6.4 35.1-11.5c-2.1-10.8-3.1-21.9-3.1-33.3c0-80.3 53.8-148 127.3-169.2c.5-2.2 .7-4.5 .7-6.8c0-17.7-14.3-32-32-32H32zM432 512a144 144 0 1 0 0-288 144 144 0 1 0 0 288zm16-208v48h48c8.8 0 16 7.2 16 16s-7.2 16-16 16H448v48c0 8.8-7.2 16-16 16s-16-7.2-16-16V384H368c-8.8 0-16-7.2-16-16s7.2-16 16-16h48V304c0-8.8 7.2-16 16-16s16 7.2 16 16z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.fas.fa-plug-circle-plus::before,
.fa-solid.fa-plug-circle-plus::before {
    content: none !important;
}

/* Match side-menu FA icons: fixed 24px slot + secondary font size */
.menu-item .fas.fa-plug-circle-plus,
.menu-item .fa-solid.fa-plug-circle-plus,
.view-title .fas.fa-plug-circle-plus,
.view-title .fa-solid.fa-plug-circle-plus {
    width: 24px;
    height: 1em;
    font-size: inherit;
    flex-shrink: 0;
}

/* Extension store: tile grid — cards stay compact, not full-bleed rows */
.extensions-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 200px));
    gap: 0.75rem;
    margin-top: 0.75rem;
    width: 100%;
    justify-content: start;
}

.extension-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.85rem 0.75rem 0.75rem;
    background: var(--bg-secondary, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 2px;
    min-width: 200px;
    width: 200px;
    box-sizing: border-box;
}

.extension-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.extension-card-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.06));
    color: var(--text-secondary, #e2e8f0);
    font-size: 1.25rem;
}

.extension-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.extension-card-body h4 {
    margin: 0;
    font-size: var(--font-size-tertiary, 0.8125rem);
    font-weight: var(--font-weight-semibold, 600);
    color: var(--text-primary, #fff);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    line-height: 1.3;
}

.extension-beta-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.05rem 0.3rem;
    border-radius: 2px;
    font-size: 0.6rem;
    font-weight: var(--font-weight-semibold, 600);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-muted, #a0aec0);
    border: 1px solid color-mix(in srgb, var(--text-muted, #a0aec0) 45%, transparent);
    background: transparent;
}

/* Larger ring for extension install/remove loading */
#extensionToggleLoadingOverlay .extension-toggle-spinner {
    width: 32px;
    height: 32px;
}

.extension-card-body p {
    margin: 0;
    font-size: 0.7rem;
    color: var(--text-muted, #a0aec0);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.extensions-empty {
    margin-top: 1rem;
    font-size: var(--font-size-tertiary, 0.8125rem);
    color: var(--text-muted, #a0aec0);
    grid-column: 1 / -1;
}

body.light-theme .extension-card {
    background: var(--bg-secondary, #fff);
    border-color: var(--border-color, rgba(0, 0, 0, 0.08));
}

body.light-theme .extension-card-icon {
    background: var(--bg-tertiary, #f1f5f9);
    color: var(--text-secondary, #2d3748);
}
