/* Content-Claude: HCL Tech Theme */

/* ── HCL Brand Colors ──────────────────────────────────── */
:root {
    --hcl-blue: #0F5FDC;
    --hcl-blue-dark: #0A3D8F;
    --hcl-blue-darker: #072B66;
    --hcl-blue-light: #B4E1FA;
    --hcl-blue-muted: #7EC8F5;
    --hcl-bg-primary: #f8fafc;
    --hcl-bg-secondary: #ffffff;
    --hcl-bg-card: #ffffff;
    --hcl-bg-elevated: #f1f5f9;
    --hcl-border: #e2e8f0;
    --hcl-border-light: #cbd5e1;
    --hcl-text-primary: #0f172a;
    --hcl-text-secondary: #334155;
    --hcl-text-muted: #64748b;
    --hcl-accent-green: #16a34a;
    --hcl-accent-yellow: #d97706;
    --hcl-accent-red: #dc2626;
    --hcl-accent-purple: #9333ea;
}

/* ── Base ───────────────────────────────────────────────── */
body {
    background-color: var(--hcl-bg-primary);
    color: var(--hcl-text-primary);
}

/* ── Dark Mode Overrides ────────────────────────────── */
.dark body {
    background-color: #0C1425; /* navy-900 equivalent */
    color: #E8EDF5;
}

.dark {
    --hcl-bg-primary: #0C1425;
    --hcl-bg-secondary: #111C32;
    --hcl-bg-card: #131E35;
    --hcl-bg-elevated: #172340;
    --hcl-border: #1E3054;
    --hcl-border-light: #284060;
    --hcl-text-primary: #E8EDF5;
    --hcl-text-secondary: #8FA3C4;
    --hcl-text-muted: #5A7399;
}

/* htmx loading indicator */
.htmx-indicator {
    display: none;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: block;
}

/* CodeMirror overrides */
.CodeMirror {
    border: none !important;
    font-size: 13px;
    line-height: 1.5;
    background: var(--hcl-bg-primary) !important;
}

.file-editor-card .CodeMirror {
    border-radius: 0;
}

/* Gray-850 → HCL elevated bg */
.bg-gray-850 {
    background-color: var(--hcl-bg-elevated);
}

/* ── Toasts ─────────────────────────────────────────────── */
@keyframes fade-in {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fade-out {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(20px); }
}

.animate-fade-in {
    animation: fade-in 0.3s ease-out;
}

.toast-message {
    cursor: pointer;
    transition: opacity 0.2s;
}
.toast-message:hover {
    opacity: 0.85;
}

/* ── Forms ──────────────────────────────────────────────── */
input[type="radio"] {
    accent-color: var(--hcl-blue);
}

input[type="checkbox"] {
    accent-color: var(--hcl-blue);
}

/* ── Editor Collapse ────────────────────────────────────── */
.editor-body {
    transition: max-height 0.2s ease-out;
}

/* ── Table ──────────────────────────────────────────────── */
.task-row {
    transition: background-color 0.15s ease;
}

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--hcl-bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--hcl-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--hcl-border-light);
}

/* ── Accessibility ──────────────────────────────────────── */
*:focus-visible {
    outline: 2px solid rgba(15, 95, 220, 0.6);
    outline-offset: 2px;
}

/* ── Skeleton Loader ────────────────────────────────────── */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, var(--hcl-bg-card) 25%, var(--hcl-border) 50%, var(--hcl-bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ── Custom Select ──────────────────────────────────────── */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%235A7399' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* ── HCL Button Styles ──────────────────────────────────── */
.btn-hcl-primary {
    background-color: var(--hcl-blue);
    color: white;
    transition: background-color 0.2s;
}
.btn-hcl-primary:hover {
    background-color: var(--hcl-blue-dark);
}

/* ── Nav active glow ────────────────────────────────────── */
.nav-link-active {
    background: rgba(15, 95, 220, 0.15);
    color: var(--hcl-blue-light);
}
