/* ============================================================================
   JugaadBox - Glow Draw Tool Styles
   ============================================================================ */

.glow-page-main,
.glow-page-main * {
    box-sizing: border-box !important;
}

.glow-page-main {
    max-width: 100% !important;
    padding: 0.5rem 1rem 2rem 1rem !important;
    width: 100% !important;
}

.glow-studio-card {
    background: #0b0d17;
    border: 2px solid rgba(0, 240, 255, 0.28);
    border-radius: 24px;
    padding: 1.2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 35px rgba(0, 240, 255, 0.14);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box !important;
}

/* Studio Header Topline */
.studio-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.studio-heading-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.studio-h1 {
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1;
    margin: 0;
    background: linear-gradient(135deg, #ffffff 20%, #a5f3fc 60%, #00f0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 25px rgba(0, 240, 255, 0.4);
}

.studio-badge {
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: #a5f3fc;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.04em;
}

.studio-top-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

/* Touch Mode Toggle Button (Mobile Scroll/Draw) */
.btn-touch-mode {
    transition: all 0.2s ease;
}

.btn-touch-mode.is-drawing {
    background: linear-gradient(135deg, #00f0ff, #0088ff) !important;
    color: #050b14 !important;
    font-weight: 700 !important;
    border-color: #00f0ff !important;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.4) !important;
}

.btn-touch-mode.is-scrolling {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffd700 !important;
    border-color: rgba(255, 215, 0, 0.6) !important;
    font-weight: 700 !important;
}

/* Studio Toolbar */
.glow-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.4rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.toolbar-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Button Pill Group */
.button-pill-group {
    display: flex;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.06);
    padding: 0.3rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.tool-pill {
    background: transparent;
    border: 1px solid transparent;
    color: rgba(255, 255, 255, 0.8);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tool-pill:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.tool-pill.active {
    background: linear-gradient(135deg, #00f0ff, #0088ff);
    color: #050b14;
    font-weight: 700;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
    border-color: #00f0ff;
}

/* Color Swatches */
.color-palette {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--swatch-color);
    border: 2px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 0 8px var(--swatch-color);
}

.color-swatch:hover {
    transform: scale(1.2);
    box-shadow: 0 0 16px var(--swatch-color);
}

.color-swatch.active {
    transform: scale(1.25);
    border-color: #fff;
    box-shadow: 0 0 20px var(--swatch-color), 0 0 6px #fff;
}

.custom-color-picker {
    position: relative;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px dashed rgba(255, 255, 255, 0.4);
}

.custom-color-picker input[type="color"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.custom-color-indicator {
    font-size: 0.85rem;
}

/* Sliders */
.sliders-group {
    display: flex;
    gap: 1.2rem;
}

.slider-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
}

.slider-item input[type="range"] {
    width: 80px;
    accent-color: #00f0ff;
    cursor: pointer;
}

/* Actions Group */
.actions-group {
    margin-left: auto;
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

/* Stage & Canvas */
.glow-stage-wrap {
    position: relative;
    width: 100%;
    height: 72vh;
    min-height: 420px;
    margin-top: 0.8rem;
    border-radius: 20px;
    overflow: hidden;
    background: #090a14;
    box-shadow: inset 0 0 45px rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
}

#glowCanvas {
    display: block;
    width: 100%;
    height: 100%;
    background: transparent;
    cursor: crosshair;
    touch-action: none;
}

/* Canvas Hint Overlay */
.canvas-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    background: rgba(11, 14, 26, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 240, 255, 0.35);
    padding: 10px 24px;
    border-radius: 30px;
    color: #a5f3fc;
    font-size: 0.92rem;
    font-weight: 600;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.5);
    transition: opacity 0.4s ease;
    white-space: nowrap;
}

.canvas-hint.is-hidden {
    opacity: 0;
}

/* Fullscreen Mode */
.glow-studio-card.is-fullscreen {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 99999 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0.6rem 0.8rem !important;
    border: none !important;
    background: #06070e !important;
}

.glow-studio-card.is-fullscreen .glow-stage-wrap {
    height: calc(100vh - 120px) !important;
    height: calc(100dvh - 120px) !important;
    border-radius: 14px !important;
}

.glow-studio-card.is-fullscreen .btn-exit-fs {
    display: inline-flex !important;
}

/* Content & FAQ styling */
.tool-content-card {
    max-width: 1000px;
    margin: 2rem auto 0 auto;
}

.tool-content-card h2 {
    font-family: 'Baloo 2', sans-serif;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.tool-content-card ol,
.tool-content-card ul {
    padding-left: 1.4rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.tool-content-card p {
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.faq-accordion {
    display: grid;
    gap: 1.2rem;
    margin-top: 1rem;
}

.faq-item {
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 1rem;
}

.faq-item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.faq-item p {
    margin-bottom: 0;
}

/* Responsive Breakpoints */
@media (max-width: 860px) {
    .actions-group {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .glow-page-main {
        padding: 0.4rem 0.5rem 1.5rem 0.5rem !important;
    }

    .glow-studio-card {
        padding: 0.75rem 0.6rem;
        border-radius: 18px;
    }

    .studio-topline {
        padding-bottom: 0.5rem;
    }

    .studio-h1 {
        font-size: 1.25rem;
    }

    .studio-badge {
        display: none;
    }

    /* On mobile, stage height is compact so user can easily scroll past */
    .glow-stage-wrap {
        height: 380px;
        min-height: 360px;
        border-radius: 16px;
    }

    /* Horizontal scrollable toolbar shelf on mobile so options don't clutter vertical space */
    .glow-toolbar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0.6rem 0;
        gap: 0.75rem;
    }

    .glow-toolbar::-webkit-scrollbar {
        display: none;
    }

    .toolbar-group {
        flex-shrink: 0;
    }

    .actions-group {
        margin-left: 0;
        flex-shrink: 0;
    }

    .canvas-hint {
        font-size: 0.8rem;
        padding: 8px 14px;
        white-space: normal;
        text-align: center;
        width: 85%;
    }

    .tool-pill {
        padding: 0.32rem 0.6rem;
        font-size: 0.76rem;
    }

    .slider-item input[type="range"] {
        width: 55px;
    }
}
