/* V2 ambient gradient */
.v2-ambient-blob {
    position: fixed;
    border-radius: 900px;
    pointer-events: none;
    z-index: 99999;
    opacity: 0;
    transition: opacity 1s ease;
}
.v2-ambient-blob.active {
    opacity: 1;
}


/* V2 Starfield background */
.v2-starfield-bg {
    pointer-events: none !important;
}
.v2-starfield-bg canvas {
    pointer-events: none !important;
}
/* Starfield visibility controlled by JS */


/* V2 Slash Commands */
.v2-slash-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    margin-bottom: 6px;
    z-index: 100000;
    display: none;
    font-family: 'Space Grotesk', sans-serif;
    border-radius: 12px;
}
.v2-slash-dropdown.visible {
    display: block;
}

/* === HOMEPAGE: Glassmorphic === */
.agency-chat-container .v2-slash-dropdown {
    background: rgba(255,255,255,0.45);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 -8px 32px rgba(0,0,0,0.08);
}
body.dark-mode .agency-chat-container .v2-slash-dropdown {
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 -8px 32px rgba(0,0,0,0.3);
}
.agency-chat-container .v2-slash-item {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: background 0.15s;
}
.agency-chat-container .v2-slash-item:hover,
.agency-chat-container .v2-slash-item.selected {
    background: rgba(255,255,255,0.3);
}
body.dark-mode .agency-chat-container .v2-slash-item:hover,
body.dark-mode .agency-chat-container .v2-slash-item.selected {
    background: rgba(255,255,255,0.08);
}
.agency-chat-container .v2-slash-cmd {
    font-weight: 600;
    font-size: 13px;
    color: rgba(0,0,0,0.8);
    white-space: nowrap;
}
body.dark-mode .agency-chat-container .v2-slash-cmd {
    color: rgba(255,255,255,0.9);
}
.agency-chat-container .v2-slash-desc {
    font-size: 12px;
    color: rgba(0,0,0,0.5);
    line-height: 1.3;
}
body.dark-mode .agency-chat-container .v2-slash-desc {
    color: rgba(255,255,255,0.5);
}
.agency-chat-container .v2-slash-category {
    padding: 6px 14px 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(0,0,0,0.35);
}
body.dark-mode .agency-chat-container .v2-slash-category {
    color: rgba(255,255,255,0.3);
}

/* === WORKSPACE: Terminal style === */
#masterConsoleOverlay .v2-slash-dropdown {
    background: rgba(10,10,18,0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0,212,170,0.15);
    box-shadow: 0 -8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(0,212,170,0.05);
    border-radius: 8px;
    font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Courier New', monospace;
}
#masterConsoleOverlay .v2-slash-item {
    padding: 8px 14px;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: background 0.1s;
    border-left: 2px solid transparent;
}
#masterConsoleOverlay .v2-slash-item:hover,
#masterConsoleOverlay .v2-slash-item.selected {
    background: rgba(0,212,170,0.06);
    border-left-color: rgba(0,212,170,0.5);
}
#masterConsoleOverlay .v2-slash-cmd {
    font-weight: 600;
    font-size: 12px;
    color: #00D4AA;
    white-space: nowrap;
    font-family: inherit;
}
#masterConsoleOverlay .v2-slash-desc {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    line-height: 1.3;
    font-family: 'Space Grotesk', sans-serif;
}
#masterConsoleOverlay .v2-slash-category {
    padding: 6px 14px 4px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(0,212,170,0.3);
    font-family: inherit;
}

/* === Shared item border radius === */
.v2-slash-item:first-child { border-radius: 12px 12px 0 0; }
.v2-slash-item:last-child { border-radius: 0 0 12px 12px; }
#masterConsoleOverlay .v2-slash-item:first-child { border-radius: 8px 8px 0 0; }
#masterConsoleOverlay .v2-slash-item:last-child { border-radius: 0 0 8px 8px; }


/* V2 Model Badge */
.v2-model-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 500;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-secondary, #888);
    border: 1px solid var(--border-color, rgba(0,0,0,0.1));
    border-radius: 9999px;
    cursor: default;
    user-select: none;
    letter-spacing: 0.3px;
}
body.dark-mode .v2-model-badge {
    color: rgba(255,255,255,0.5);
    border-color: rgba(255,255,255,0.12);
}


/* V2 Artifact Layout Modes */
.v2-split-mode#v2-artifact-overlay { width: 70vw !important; }
.v2-full-mode#v2-artifact-overlay { width: 100vw !important; left: 0 !important; }
body.v2-split-active #verneSidebar { width: 30vw !important; max-width: 30vw !important; }
body.v2-full-active #verneSidebar { display: none !important; }
body.v2-full-active .master-console-content { display: none !important; }
.v2-overlay-expand-btn {
    position: absolute;
    top: 12px;
    right: 48px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.15s;
    color: rgba(255,255,255,0.6);
}
.v2-overlay-expand-btn:hover {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.9);
}
body:not(.dark-mode) .v2-overlay-expand-btn {
    border-color: rgba(0,0,0,0.1);
    color: rgba(0,0,0,0.4);
}
body:not(.dark-mode) .v2-overlay-expand-btn:hover {
    background: rgba(0,0,0,0.04);
    color: rgba(0,0,0,0.7);
}


/* V2 override: titles content full width in overlay */
#v2-overlay-body .step-titles-content {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}
#v2-overlay-body #overlaysTableContainer {
    width: 100% !important;
}


/* V2 override: titles content in consoleContentArea — match V1 layout */
#consoleContentArea .step-titles-content {
    max-width: none !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: transparent !important;
    color: #ffffff !important;
    text-align: left !important;
}
#consoleContentArea #overlaysTableContainer {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    overflow-y: auto !important;
    min-height: 0 !important;
    width: 100% !important;
    padding: 8px !important;
    position: relative !important;
}
#consoleContentArea #overlaysListBody {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
}
#consoleContentArea #titlesBottomBar {
    display: flex !important;
    flex-shrink: 0 !important;
    width: 100% !important;
    border-top: 1px solid rgba(0,255,0,0.2) !important;
    padding: 10px 16px !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: inherit !important;
}
#consoleContentArea #titlesSearchBar {
    padding: 8px 8px 4px !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background: inherit !important;
    width: 100% !important;
}
#consoleContentArea .title-card::after {
    background: #0a0a14 !important;
}
#consoleContentArea .title-card-detail {
    background: #0d1117 !important;
}
#consoleContentArea .title-card-badge {
    background: #0a0a14 !important;
}


/* V2 override: export content in consoleContentArea */
#consoleContentArea .step-export-content {
    max-width: none !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: transparent !important;
    color: #ffffff !important;
    text-align: left !important;
}
#consoleContentArea .export-layout {
    flex: 1 !important;
    min-height: 0 !important;
}
#consoleContentArea #exportBottomBar {
    flex-shrink: 0 !important;
    width: 100% !important;
}


/* V2 Prompt Chips */
.v2-prompt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 4px;
    animation: chipsSlideIn 0.3s ease-out;
}
@keyframes chipsSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.v2-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    font-family: "Space Grotesk", sans-serif;
    cursor: pointer;
    border: 1px solid rgba(88, 166, 255, 0.3);
    background: rgba(88, 166, 255, 0.08);
    color: #58a6ff;
    transition: all 0.2s;
    white-space: nowrap;
}
.v2-chip:hover {
    background: rgba(88, 166, 255, 0.15);
    border-color: rgba(88, 166, 255, 0.5);
    box-shadow: 0 2px 8px rgba(88, 166, 255, 0.15);
}
.v2-chip.v2-chip-primary {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.4);
    color: #4ADE80;
}
.v2-chip.v2-chip-primary:hover {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.6);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}
body:not(.dark-mode) .v2-chip {
    border-color: rgba(74, 127, 212, 0.3);
    background: rgba(74, 127, 212, 0.06);
    color: #4a7fd4;
}
body:not(.dark-mode) .v2-chip:hover {
    background: rgba(74, 127, 212, 0.12);
    border-color: rgba(74, 127, 212, 0.5);
}
body:not(.dark-mode) .v2-chip.v2-chip-primary {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.3);
    color: #16A34A;
}

/* V2 Loading Spinner (Session 18) */
.v2-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: #6366f1;
    border-radius: 50%;
    animation: v2-spin 0.8s linear infinite;
}
@keyframes v2-spin {
    to { transform: rotate(360deg); }
}
body:not(.dark-mode) .v2-loading-spinner,
.light-mode .v2-loading-spinner {
    border-color: rgba(0, 0, 0, 0.1);
    border-left-color: #6366f1;
}

/* Encoding loading indicator in chat (Session 18) */
.v2-encode-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
}
.v2-encode-loading .v2-loading-spinner {
    width: 24px;
    height: 24px;
    border-width: 3px;
    flex-shrink: 0;
}
.v2-encode-loading-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.v2-encode-status-label {
    color: var(--text-primary, #e0e0e0);
    font-size: 14px;
    font-family: Inter, sans-serif;
    font-weight: 500;
}

.v2-encode-eta {
    color: var(--text-secondary, #aaa);
    font-size: 12px;
    font-family: Inter, sans-serif;
}

.v2-encode-complete {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
}

.v2-encode-complete .v2-encode-status-label {
    color: #22c55e;
}

.v2-encode-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.v2-encode-error .v2-encode-status-label {
    color: #ef4444;
}


