/* assets/css/env-vault.css */

:root {
    --bg: var(--id8-bg, #F6F4EF);
    --panel: var(--id8-bg, #F6F4EF);
    --muted: var(--id8-ink-muted, #4B5160);
    --accent: var(--id8-primary, #6B2FD6);
    --accent-hover: var(--id8-primary, #6B2FD6);
    --text-primary: var(--id8-info, #1F5FBF);
    --topbar-height: 64px;
    /* Approximate header height */
}

/* Custom Scrollbar for "Hacker" Aesthetic */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--id8-bg, #F6F4EF);
    /* slate-900 */
}

::-webkit-scrollbar-thumb {
    background: var(--id8-surface-sunken, #EFECE5);
    /* slate-700 */
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--id8-border, #DCD8CE);
    /* slate-600 */
}

/* Editor Styling */
textarea#code-editor {
    field-sizing: content;
    /* Modern property for auto-growth if needed, though we use fixed height here */
    resize: none;
    outline: none;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    line-height: 1.6;
    tab-size: 2;
}

/* Drop Zone Active State */
#drop-zone.active {
    display: flex;
    border-color: var(--id8-primary, #6B2FD6);
    /* indigo-500 */
    background-color: rgb(var(--id8-primary-rgb, 107 47 214) / 0.225);
}

/* Art Selection Highlight */
/* Using a specific class logic in JS, but supporting styles here */
.art-btn.selected {
    border-color: var(--id8-primary, #6B2FD6);
    /* indigo-500 */
    background-color: rgb(var(--id8-primary-rgb, 107 47 214) / 0.15);
    color: var(--id8-ink, #16181D);
}

.art-btn.selected .rounded-full {
    background-color: var(--id8-primary, #6B2FD6);
    /* indigo-600 */
    color: #FFFFFF;
    box-shadow: 0 0 15px rgb(var(--id8-primary-rgb, 107 47 214) / 0.25);
}

/* Modal Animation */
dialog[open] {
    animation: fade-in 0.2s ease-out;
}

dialog::backdrop {
    background: rgb(var(--id8-ink-rgb, 22 24 29) / 0.55);
    backdrop-filter: blur(4px);
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Sidebar Item Active State */
.project-item.active {
    background-color: var(--id8-surface, #FFFFFF);
    /* slate-800 */
    color: var(--id8-ink, #16181D);
    /* slate-50 */
    border-left: 2px solid var(--id8-primary, #6B2FD6);
    /* indigo-500 */
}

/* Tab Active State */
.editor-tab.active {
    background-color: var(--id8-bg, #F6F4EF);
    /* slate-950 */
    color: var(--id8-primary, #6B2FD6);
    /* indigo-400 */
    border-top: 2px solid var(--id8-primary, #6B2FD6);
    /* indigo-500 */
    border-bottom: 2px solid var(--id8-border, #DCD8CE);
    /* match bg to hide border */
}

/* Fullscreen Mode (Overrides all layout constraints) */
.fullscreen-mode {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background-color: var(--id8-bg, #F6F4EF) !important;
    /* slate-950 */
    padding-top: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* --- FIXES REQUESTED BY USER --- */

/* 1. Upload Button Restyling */
.btn-file {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent);
    color: var(--id8-ink, #16181D);
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s ease, background 0.15s ease, box-shadow 0.15s ease;
    min-height: 44px;
}

.btn-file:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-file:active {
    transform: translateY(0);
}

.btn-file:focus-visible {
    outline: 3px solid rgb(var(--id8-primary-rgb, 107 47 214) / 0.45);
    outline-offset: 4px;
}

/* 2. Upload Dropzone Improvement */
.upload-dropzone {
    border: 1px dashed var(--id8-border, #DCD8CE);
    border-radius: 14px;
    padding: 40px;
    text-align: center;
    background: rgba(22, 24, 29, 0.03);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.upload-dropzone:hover {
    border-color: var(--accent);
    background: rgb(var(--id8-primary-rgb, 107 47 214) / 0.06);
}

/* 3. Editor Layout Fixes */
.workspace {
    display: flex;
    /* Ensure flex is applied even if hidden class toggling messes up */
    height: calc(100vh - var(--topbar-height));
    width: 100%;
}

.workspace.hidden {
    display: none !important;
}

.sidebar {
    width: 280px;
    min-width: 220px;
    display: flex;
    flex-direction: column;
}

.editor-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 320px;
    height: 100%;
}

.editor-container {
    flex: 1;
    display: flex;
    position: relative;
    overflow: hidden;
}

.paste-box {
    width: 100%;
    height: 100%;
    /* Fill container */
    resize: none;
    padding: 16px;
    background: rgba(22, 24, 29, 0.03);
    border-radius: 0;
    /* Remove radius to fit flush */
    color: var(--text-primary);
    font-family: ui-monospace, monospace;
    outline: none;
    border: none;
}

/* --- NEW SECTIONS (Security & FAQ) --- */

/* Security Cards (Adapted from .cap-card) */
.sec-card {
    background: var(--id8-bg, #F6F4EF);
    border: 1px solid rgb(var(--id8-primary-rgb, 107 47 214) / 0.45);
    /* Using accent color #7c3aed */
    border-radius: 12px;
    padding: 24px;
    transition: border-color 0.2s, transform 0.2s, background 0.2s;
}

.sec-card:hover {
    border-color: rgb(var(--id8-primary-rgb, 107 47 214) / 0.5);
    background: rgb(var(--id8-primary-rgb, 107 47 214) / 0.075);
    /* Slight tint */
    transform: translateY(-2px);
}

/* FAQ Accordion */
.faq-item {
    border: 1px solid var(--id8-border, #DCD8CE);
    /* slate-700/50 */
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    background: var(--id8-bg, #F6F4EF);
}

.faq-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--id8-ink, #16181D);
    /* slate-100 */
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.faq-trigger:hover {
    background: var(--id8-surface, #FFFFFF);
    /* slate-800/50 */
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: rgba(22, 24, 29, 0.18);
    /* slate-900/30 */
}

.faq-answer.open {
    max-height: 500px;
    /* Arbitrary large height */
    transition: max-height 0.3s ease-in;
}

.faq-answer p {
    padding: 20px;
    padding-top: 10px;
    font-size: 0.9rem;
    color: var(--id8-ink-muted, #4B5160);
    /* slate-400 */
    line-height: 1.6;
}

.faq-icon {
    transition: transform 0.3s ease;
    color: var(--accent);
}

.faq-icon.open {
    transform: rotate(45deg);
}