/* SLIBLE Creative Studio — additive catalog UI; canvas rendering remains in canvas.js. */
.app-shell .creative-studio-section {
    padding-block: 14px 16px;
    background: color-mix(in srgb, var(--surface, #fff) 88%, var(--accent-soft, #fff0e6));
}

.creative-studio-section .section-title-row {
    align-items: center;
    margin-bottom: 11px;
}

.creative-studio-status {
    margin-left: auto;
}

.creative-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin-bottom: 11px;
    padding: 3px;
    border: 1px solid var(--border, rgba(0, 0, 0, .12));
    border-radius: 10px;
    background: var(--surface-muted, #f4f2ee);
}

.creative-tab {
    min-width: 0;
    min-height: 31px;
    padding: 5px 4px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: var(--text-secondary, #626366);
    font: 700 10px/1.15 'Open Sans', sans-serif;
    letter-spacing: .01em;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.creative-tab:hover,
.creative-tab:focus-visible {
    color: var(--accent-ink, #a5360d);
    background: var(--surface-raised, #fff);
}

.creative-tab:focus-visible,
.creative-card:focus-visible,
.creative-reset-effects:focus-visible {
    outline: 2px solid var(--accent, #e95b20);
    outline-offset: 2px;
}

.creative-tab[aria-selected="true"] {
    border-color: color-mix(in srgb, var(--accent, #e95b20) 27%, transparent);
    background: var(--accent-soft, #fff0e6);
    color: var(--accent-ink, #a5360d);
}

.creative-panel-intro {
    margin: 0 0 11px;
    color: var(--text-secondary, #626366);
    font-size: 10px;
    line-height: 1.45;
}

.creative-panel {
    max-height: min(62vh, 610px);
    padding-right: 2px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.creative-catalog-search {
    display: block;
    margin: 0 0 10px;
}

.creative-catalog-search input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 32px;
    padding: 6px 9px;
    border: 1px solid var(--border, rgba(0, 0, 0, .16));
    border-radius: 8px;
    background: var(--surface-raised, #fff);
    color: var(--text, #24272a);
    font: 600 10px/1.2 'Open Sans', sans-serif;
}

.creative-catalog-search input:focus-visible {
    outline: 2px solid var(--accent, #e95b20);
    outline-offset: 1px;
}

.creative-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.creative-group-label {
    margin: 13px 0 7px;
    color: var(--text-secondary, #626366);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.creative-panel > .creative-group-label:first-of-type {
    margin-top: 0;
}

.creative-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.creative-card {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 5px;
    overflow: hidden;
    border: 1px solid var(--border, rgba(0, 0, 0, .12));
    border-radius: 9px;
    background: var(--surface-raised, #fff);
    color: var(--text, #24272a);
    text-align: left;
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.creative-card[hidden],
.creative-card-grid[hidden] {
    display: none;
}

.creative-card:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--accent, #e95b20) 48%, var(--border, #ddd));
    box-shadow: 0 3px 10px rgba(34, 30, 24, .09);
    transform: translateY(-1px);
}

.creative-card:disabled,
.creative-reset-effects:disabled {
    cursor: not-allowed;
    opacity: .54;
}

.creative-card-preview {
    display: grid;
    width: 34px;
    min-height: 36px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .23);
    border-radius: 6px;
    background-position: center;
    background-size: cover;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.creative-card-style .creative-card-preview {
    color: #202124;
    text-shadow: 0 1px rgba(255, 255, 255, .45);
}

.creative-card-effect .creative-card-preview::after {
    width: 19px;
    height: 19px;
    border: 2px solid rgba(255, 255, 255, .92);
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, .13), 0 0 12px rgba(255, 255, 255, .8);
    content: '';
}

.creative-card-effect .creative-card-preview[data-effect="fade-left"]::after {
    border-radius: 50% 15% 15% 50%;
    transform: translateX(-4px);
}

.creative-card-effect .creative-card-preview[data-effect="vignette"]::after {
    box-shadow: inset 0 0 0 4px rgba(0, 0, 0, .4), 0 0 0 5px rgba(255, 255, 255, .13);
}

.creative-card-details {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
}

.creative-card-details strong {
    overflow: hidden;
    color: var(--text, #24272a);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.16;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Hex parameter labels are kept on the neutral surface, never over the colour preview. */
.creative-card-meta {
    overflow: hidden;
    color: var(--text-secondary, #626366);
    font: 9px/1.2 'Open Sans', sans-serif;
    letter-spacing: .01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.creative-reset-effects {
    width: 100%;
    min-height: 32px;
    margin-top: 10px;
    padding: 6px 9px;
    border: 1px dashed var(--border, rgba(0, 0, 0, .18));
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary, #626366);
    font: 700 10px/1.2 'Open Sans', sans-serif;
}

.creative-reset-effects:hover:not(:disabled) {
    border-color: var(--accent, #e95b20);
    color: var(--accent-ink, #a5360d);
    background: var(--accent-soft, #fff0e6);
}

@media (max-width: 380px) {
    .creative-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .creative-tab,
    .creative-card {
        transition: none;
    }

    .creative-card:hover:not(:disabled) {
        transform: none;
    }
}
