/* Hide WP header & footer on Label Studio page */
body.page .site-header,
body.page header.wp-block-template-part,
body.page footer.wp-block-template-part,
body.page .site-footer {
    display: none !important;
}

/* Remove theme padding */
body.page {
    margin: 0;
    padding: 0;
}
#swp-ls-variation:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

.swp-ls-container {
    --primary: #0066ff;
    --accent: #00d2ff;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --surface-glass: rgba(255, 255, 255, 0.78);
    --border: #e2e8f0;
    --text: #0f172a;
    --muted: #64748b;

    --canvas-width: 640px;
    --canvas-height: 820px;

    --safe-margin: 18px;
        --bleed-margin: 6px;
        --grid-size: 10px;
        --snap-threshold: 6px;
    
        font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    position: relative;
        min-height: 800px;
}

.swp-ls-container .bg-blob {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.6;
    filter: blur(60px);
    z-index: 0;
    overflow: hidden;
}

.swp-ls-container .bg-blob::before,
.swp-ls-container .bg-blob::after {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, rgba(0, 102, 255, 0.4), rgba(0, 210, 255, 0.1), transparent 70%);
}

.swp-ls-container .app-shell {
    position: relative;
    z-index: 1;
}

.swp-ls-container .top-header {
    background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    border-radius: 12px 12px 0 0;
}

.swp-ls-container .brand-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    background: white;
    border: 1px solid var(--border);
}

.swp-ls-container .brand-logo {
    width: 30px;
        height: 30px;
        border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: grid;
    place-items: center;
    color: white;
}

.swp-ls-container .brand-title {
    font-weight: 800;
    margin: 0;
    font-size: 0.9rem;
}

.swp-ls-container .brand-sub {
    margin: 0;
    font-size: 0.7rem;
    color: var(--muted);
}

.swp-ls-container .status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: white;
        font-size: 0.75rem;
    border: 1px solid var(--border);
}

.swp-ls-container .status-dot {
    width: 8px;
        height: 8px;
        border-radius: 50%;
    background: #22c55e;
}

.swp-ls-container .status-dot.dirty {
    background: #f59e0b;
}

.swp-ls-container .steps-bar {
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

.swp-ls-container .step-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-weight: 700;
    font-size: 0.85rem;
}

.swp-ls-container .step-item.active {
    color: var(--primary);
}

.swp-ls-container .step-icon {
    width: 24px;
        height: 24px;
        border-radius: 50%;
    background: #f1f5f9;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.swp-ls-container .step-item.active .step-icon {
    background: var(--primary);
    color: white;
}

.swp-ls-container .designer-layout {
    display: grid;
    grid-template-columns: 290px 1fr 320px;
    gap: 18px;
    padding: 16px 18px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.swp-ls-container .panel {
    background: var(--surface-glass);
    backdrop-filter: blur(12px);
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226,232,240,0.9);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.swp-ls-container .panel-header {
    padding: 14px;
    border-bottom: 1px solid rgba(226,232,240,0.9);
    font-weight: 800;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: #475569;
    background: rgba(248,250,252,0.72);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
}

.swp-ls-container .panel-body {
    padding: 14px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.swp-ls-container .tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.swp-ls-container .tool-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
        padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.swp-ls-container .tool-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.swp-ls-container .tool-card i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: #334155;
    display: block;
    margin-bottom: 5px;
}

.swp-ls-container .tool-card span {
    font-size: 0.75rem;
    font-weight: 800;
    color: #64748b;
}

/* ========== PROPERTIES ========== */
.swp-ls-container .prop-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: #94a3b8;
    margin-bottom: 6px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.swp-ls-container .prop-row {
    margin-bottom: 14px;
}

/* ========== TEMPLATES ========== */
.swp-ls-container .template-scroller {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 10px;
}
.swp-ls-container .template-thumb {
    min-width: 80px;
        height: 50px;
        border-radius: 8px;
        cursor: pointer;
        position: relative;
            overflow: hidden;
    box-shadow: 0 10px 24px rgba(15,23,42,0.10);
    transition: transform 0.16s ease, border-color 0.16s ease;
}

.swp-ls-container .template-thumb:hover {
    transform: translateY(-2px);
    border-color: rgba(0,102,255,0.55);
}

.swp-ls-container .template-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(15,23,42,0.28));
}

.swp-ls-container .template-label {
    position: absolute;
        bottom: 4px;
            left: 6px;
            color: white;
            font-size: 0.6rem;
            font-weight: 800;
}

.swp-ls-container .center-stage {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.swp-ls-container .action-bar {
    background: white;
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 8px;
        display: flex;
        justify-content: space-between;
            align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 14px 36px rgba(15,23,42,0.08);
    flex-shrink: 0;
}

.swp-ls-container .action-left,
.swp-ls-container .action-right {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.swp-ls-container .icon-btn {
    width: 32px;
        height: 32px;
        border-radius: 8px;
        border: 1px solid var(--border);
        background: white;
        color: #475569;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, color 0.12s ease;
        display: inline-grid;
            place-items: center;
        transition: all 0.2s;
}
.swp-ls-container .icon-btn:hover {
    color: var(--primary);
}

.swp-ls-container .icon-btn.active {
    background: rgba(224,242,254,0.92);
    border-color: rgba(0,102,255,0.35);
    color: var(--primary);
}

.swp-ls-container .icon-btn.danger:hover {
    color: #ef4444;
}

.swp-ls-container .vr-separator {
    width: 1px;
    height: 20px;
    background: rgba(226,232,240,0.95);
    margin: 0 2px;
}

.swp-ls-container .canvas-area {
    flex: 1;
        background: #f1f5f9;
            border-radius: 12px;
            border: 1px solid var(--border);
            position: relative;
            display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,0.65), rgba(255,255,255,0.10)),
                #e0f2fe;
    border: 1px solid rgba(226,232,240,0.9);
    box-shadow: 0 20px 60px rgba(15,23,42,0.12);
}
.swp-ls-container .canvas-wrapper {
    position: relative;
    transition: transform 0.2s;
}

.swp-ls-container .canvas-card {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 60px rgba(0,0,0,0.22);
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(226,232,240,0.8);
}

.swp-ls-container canvas#c {
    display: block;
    width: var(--canvas-width);
    height: var(--canvas-height);
}

.swp-ls-container .grid-overlay {
    position: absolute;
        inset: 0;
    background-image:
        linear-gradient(rgba(148,163,184,0.4) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148,163,184,0.4) 1px, transparent 1px);
    background-size: 20px 20px;
        pointer-events: none;
            opacity: 0;
    z-index: 20;
    transition: opacity 0.16s ease;
}
.swp-ls-container .grid-overlay.show {
    opacity: 0.2;
}

.swp-ls-container .safe-overlay {
    position: absolute;
    inset: 18px;
        border: 1px dashed rgba(34, 197, 94, 0.5);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.16s ease;
    border: 2px dashed rgba(34,197,94,0.8);
    box-shadow: 0 0 0 4px rgba(34,197,94,0.10);
    border-radius: 14px;
}

.swp-ls-container .safe-overlay.show {
    opacity: 1;
}

.swp-ls-container .zoom-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
}

.swp-ls-container .pill-btn {
    border-radius: 999px;
    border: 1px solid var(--border);
        background: white;
        padding: 4px 12px;
    font-weight: 800;
    font-size: 0.85rem;
    color: #475569;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.swp-ls-container .pill-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(15,23,42,0.10);
    color: var(--primary);
}

/* ========== TABS ========== */
.swp-ls-container .nav-pills .nav-link {
    border-radius: 999px !important;
    font-weight: 800;
    font-size: 0.85rem;
    color: #64748b;
    border: 1px solid rgba(226,232,240,0.9);
    background: rgba(255,255,255,0.72);
}

.swp-ls-container .nav-pills .nav-link.active {
    background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
    color: white !important;
    border-color: transparent;
    box-shadow: 0 14px 28px rgba(0,102,255,0.18);
}

/* ========== LAYERS ========== */
.swp-ls-container .layer-item {
    display: flex;
        align-items: center;
            justify-content: space-between;
        padding: 8px;
            border: 1px solid var(--border);
            border-radius: 8px;
            margin-bottom: 5px;
            font-size: 0.8rem;
            cursor: pointer;
    user-select: none;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.swp-ls-container .layer-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(15,23,42,0.08);
}

.swp-ls-container .layer-item.active {
    border-color: rgba(0,102,255,0.45);
    box-shadow: 0 14px 28px rgba(0,102,255,0.12);
}

/* ========== HINT CARD ========== */
.swp-ls-container .hint-card {
    border: 1px dashed rgba(148,163,184,0.7);
    background: rgba(248,250,252,0.7);
    border-radius: 16px;
    padding: 14px;
    color: #64748b;
    font-size: 0.9rem;
}

.swp-ls-container .prop-label {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 8px;
    border: 1px solid rgba(226,232,240,0.9);
    background: rgba(255,255,255,0.8);
    color: #334155;
    display: inline-block;
}

.swp-ls-container .prop-row {
    margin-bottom: 10px;
}

.swp-ls-container .price-box {
    border-top: 1px solid var(--border);
        padding-top: 15px;
    margin-top: auto;
}

/* Product preview styles */
#bottle-preview-container {
    background: #f8fafc;
    border-radius: 12px;
    padding: 10px;
    text-align: center;
}
@media (max-width: 991px) {
    .swp-ls-container .designer-layout {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }
    
    .swp-ls-container .canvas-area {
        height: 500px;
    }
    
    .swp-ls-container .panel {
        max-height: 600px;
    }
}