/* Shop theme layer ------------------------------------------------------------
   Purposefully small: shop colors are applied through CSS variables only and
   should not override card surfaces or page-specific component structure. */
:root {
    --pc-theme-primary: var(--pc-primary, #2563eb);
    --pc-theme-secondary: #0f172a;
    --pc-theme-secondary-dark: #0b1120;
    --pc-theme-secondary-soft: #eef2ff;
    --pc-theme-accent: #38bdf8;
    --pc-theme-accent-soft: #e0f7ff;
    --pc-focus-ring: 0 0 0 4px rgba(37, 99, 235, 0.16);
}

.app-sidebar {
    background: linear-gradient(180deg, var(--pc-theme-secondary) 0%, var(--pc-theme-secondary-dark) 100%);
}

.app-brand-title {
    color: #ffffff;
}

.app-brand-subtitle {
    color: rgba(255, 255, 255, 0.62);
}

.app-nav a:hover {
    background: rgba(255, 255, 255, 0.09);
}

.app-nav a[aria-current="page"],
.app-nav a.is-active,
.app-nav .is-active > a {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 3px 0 0 var(--pc-theme-accent);
    color: #ffffff;
}

.app-topbar {
    box-shadow: inset 0 -2px 0 rgba(var(--pc-theme-primary-rgb, 37, 99, 235), 0.11);
}

.btn:focus-visible,
.form-control:focus-visible,
.topbar-shop-select:focus-visible {
    box-shadow: var(--pc-focus-ring);
}

.btn-primary {
    box-shadow: 0 10px 22px rgba(var(--pc-theme-primary-rgb, 37, 99, 235), 0.14);
}

.btn-primary:hover {
    box-shadow: 0 12px 26px rgba(var(--pc-theme-primary-rgb, 37, 99, 235), 0.18);
}

.page-eyebrow,
.datatable-section-kicker,
.detail-kicker {
    color: var(--pc-theme-primary);
}

.shop-theme-card {
    border-color: rgba(var(--pc-theme-primary-rgb, 37, 99, 235), 0.16);
}

.shop-theme-layout {
    align-items: stretch;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
}

.shop-theme-fields {
    display: grid;
    gap: 18px;
}

.shop-theme-color-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.shop-theme-color-field input[type="color"].form-control {
    cursor: pointer;
    min-height: 46px;
    padding: 5px;
}

.shop-theme-color-field input[type="color"].form-control::-webkit-color-swatch-wrapper {
    padding: 0;
}

.shop-theme-color-field input[type="color"].form-control::-webkit-color-swatch {
    border: 0;
    border-radius: 9px;
}

.shop-theme-color-field input[type="color"].form-control::-moz-color-swatch {
    border: 0;
    border-radius: 9px;
}

.shop-theme-preview {
    background:
        radial-gradient(circle at 86% 18%, var(--shop-preview-accent-soft, #e0f7ff) 0, transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    display: grid;
    min-height: 230px;
    overflow: hidden;
}

.shop-theme-preview-top {
    background: linear-gradient(135deg, var(--shop-preview-secondary, #0f172a) 0%, var(--shop-preview-secondary-dark, #0b1120) 100%);
    color: #ffffff;
    padding: 17px 18px;
}

.shop-theme-preview-title {
    font-size: 16px;
    font-weight: var(--pc-font-medium, 500);
    letter-spacing: -0.02em;
}

.shop-theme-preview-subtitle {
    color: rgba(255, 255, 255, 0.66);
    font-size: 13px;
    margin-top: 4px;
}

.shop-theme-preview-body {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.shop-theme-preview-line {
    background: #e2e8f0;
    border-radius: 999px;
    height: 9px;
}

.shop-theme-preview-line:nth-child(1) {
    background: var(--shop-preview-primary-soft, #eff6ff);
    width: 88%;
}

.shop-theme-preview-line:nth-child(2) {
    width: 64%;
}

.shop-theme-preview-actions {
    align-items: center;
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.shop-theme-preview-button {
    background: var(--shop-preview-primary, #2563eb);
    border-radius: 10px;
    box-shadow: 0 10px 22px rgba(var(--shop-preview-primary-rgb, 37, 99, 235), 0.16);
    color: #ffffff;
    font-size: 13px;
    font-weight: var(--pc-font-medium, 500);
    padding: 10px 14px;
}

.shop-theme-preview-accent {
    background: var(--shop-preview-accent, #38bdf8);
    border-radius: 999px;
    height: 11px;
    width: 56px;
}

.shop-theme-preview-note {
    color: #64748b;
    font-size: 13px;
    line-height: 1.35;
}

.shop-theme-custom-disabled .shop-theme-color-field {
    opacity: 0.52;
}

.shop-theme-custom-disabled .shop-theme-color-field input {
    cursor: not-allowed;
}

@media (max-width: 980px) {
    .shop-theme-layout,
    .shop-theme-color-grid {
        grid-template-columns: 1fr;
    }
}
