/* =========================================
   BARCODE STUDIO PRO - ELITE STUDIO V59 (FINAL)
   ========================================= */

/* 1. Global Reset */
html,
body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

footer,
.footer-bottom,
.copyright {
    display: none !important;
}

.barcode-wrapper {
    background: #020617;
    min-height: 100vh;
    padding: 40px 0;
    color: #fff;
    font-family: 'Inter', sans-serif;
    position: relative;
    isolation: isolate;
}

/* Background Animation */
.barcode-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg at 50% 50%, transparent 0deg, rgba(255, 51, 102, 0.1) 60deg, transparent 120deg, rgba(0, 173, 239, 0.08) 240deg, transparent 360deg);
    animation: spinBg 25s linear infinite;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.8;
    pointer-events: none;
}

@keyframes spinBg {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* 2. Layout (DESKTOP) */
.studio-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 380px;
    /* ✅ Sidebar Left, Preview Right */
    grid-template-areas: "sidebar preview";
    gap: 30px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
    align-items: start;
}

.section-title {
    font-size: 32px;
    font-weight: 800;
    text-align: center;
    margin: 0;
}

.highlight-text {
    color: #ff3366;
}

.section-subtitle {
    color: #64748b;
    text-align: center;
    font-size: 13px;
    margin-bottom: 30px;
}

/* 3. Sidebar */
.studio-sidebar {
    grid-area: sidebar;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 25px;
    backdrop-filter: blur(10px);
}

.studio-group {
    margin-bottom: 20px;
}

.studio-group label {
    display: block;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

/* ✅ Label Row: Space Between (Label Left, Counter Right) */
.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Inputs */
.studio-input,
.studio-select {
    width: 100%;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 12px;
    color: #fff;
    border-radius: 6px;
    outline: none;
    font-size: 14px;
}

.studio-input:focus {
    border-color: #00ADEF;
}

/* Smart Digit Box */
.check-digit-box {
    width: 45px;
    height: 41px;
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: none;
    border-radius: 0 6px 6px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #ff3366;
    font-size: 16px;
}

/* Options */
.compact-options-horizontal {
    display: flex;
    flex-direction: row;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
    justify-content: flex-start;
    gap: 20px;
}

.simple-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #94a3b8;
    cursor: pointer;
    user-select: none;
}

.simple-check:hover {
    color: #ff3366;
}

.simple-check input[type="checkbox"] {
    accent-color: #ff3366;
    width: 14px;
    height: 14px;
    margin: 0;
}

/* Error & Specs */
.error-msg {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 10px;
    border-radius: 6px;
    font-size: 11px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}

.spec-text {
    color: #64748b;
    font-size: 10px;
    margin-top: 8px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

/* 4. Preview Panel */
.studio-preview {
    grid-area: preview;
    position: sticky;
    top: 100px;
    height: fit-content;
    text-align: center;
}

.canvas-wrapper {
    background: white;
    padding: 30px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    min-height: 120px;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.canvas-wrapper.inverse {
    background: #000;
}

/* Buttons */
.studio-btn {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    font-size: 11px;
    border: none;
    transition: 0.3s;
}

.pink {
    background: #ff3366;
    color: #fff;
}

.studio-btn-outline {
    width: 100%;
    background: none;
    border: 1px solid #ff3366;
    color: #ff3366;
    padding: 12px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 11px;
    margin-top: 20px;
    cursor: pointer;
}

.count-badge {
    background: #1e293b;
    color: #ff3366;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 900;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.dl-png {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 800;
}

.dl-png.hd {
    border-color: #00ADEF;
    color: #00ADEF;
}

/* =========================================
   📱 MOBILE CONFIGURATION
   ========================================= */
@media (max-width: 900px) {
    .studio-container {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
        grid-template-areas: none;
        grid-template-columns: 1fr;
    }

    /* 1. STICKY PREVIEW (Top) */
    .studio-preview {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: rgba(2, 6, 23, 0.95);
        backdrop-filter: blur(15px);
        width: calc(100% + 30px);
        margin: 0 -15px;
        padding: 15px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.6);
        display: flex;
        justify-content: center;
    }

    .canvas-wrapper {
        min-height: auto;
        padding: 15px;
        transform: scale(0.9);
    }

    .download-section {
        display: none;
    }

    /* 2. SIDEBAR BOX (Bottom) */
    .studio-sidebar {
        margin-top: 0;
        padding: 20px 15px;

        /* ✅ BOX IS CENTERED */
        width: 100%;
        max-width: 500px;
        /* Limits width so it looks like a box */
        margin: 0 auto;
        /* Centers the box physically */

        /* ✅ TEXT IS LEFT ALIGNED */
        text-align: left;
    }

    .section-title {
        font-size: 24px;
    }

    /* Ensure Inputs are Left Aligned */
    .studio-input,
    .studio-select {
        text-align: left;
    }

    /* Ensure Options Start from Left */
    .compact-options-horizontal {
        justify-content: flex-start;
    }

    /* Ensure Label Separated */
    .label-row {
        justify-content: space-between;
    }
}