/* ByteSav Strict Design System Constants & Configuration */

:root {
    /* Core Colors */
    --background: #0A0A0A;
    --foreground: #FAFAFA;
    --muted: #1A1A1A;
    --muted-foreground: #737373;
    --accent: #4A69BD;
    --accent-foreground: #0A0A0A;
    --border: #262626;
    --border-hover: #404040;
    --input: #1A1A1A;
    --card: #0F0F0F;
    --card-foreground: #FAFAFA;
    --ring: #4A69BD;

    /* Status Colors */
    --success: #22C55E;
    --warning: #F59E0B;
    --error: #EF4444;

    /* Typography Scales */
    --font-sans: "Inter Tight", "Inter", system-ui, sans-serif;
    --font-display: "Playfair Display", Georgia, serif;
    --font-mono: "JetBrains Mono", "Fira Code", monospace;

    /* Typography Tracking */
    --tracking-tighter: -0.06em;
    --tracking-tight: -0.04em;
    --tracking-normal: -0.01em;
    --tracking-wide: 0.05em;
    --tracking-wider: 0.1em;
    --tracking-widest: 0.2em;
}

body {
    background: var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
    letter-spacing: var(--tracking-normal);
    line-height: 1.6;
}

/* MANDATORY TACTILE NOISE OVERLAY */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* MANDATORY BRUTALIST FOCUS STATES */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* MANDATORY CUSTOM SCROLLBAR */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 0;
}

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

/* SELECTION */
::selection {
    background: var(--accent);
    color: var(--accent-foreground);
}


/* ByteSav Specific Utility Classes */

.text-display {
    font-family: var(--font-display);
    letter-spacing: var(--tracking-tighter);
    line-height: 1;
}

.text-headline {
    font-family: var(--font-sans);
    letter-spacing: var(--tracking-tight);
    font-weight: 700;
    line-height: 1.1;
}

.text-label {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    font-size: 0.75rem;
    /* text-xs */
    font-weight: 500;
    color: var(--muted-foreground);
}

/* Custom Input Wrapper / Component */
.input-field {
    height: 3.5rem;
    /* h-14 */
    padding-left: 1rem;
    padding-right: 1rem;
    border-radius: 0;
    background-color: var(--input);
    border: 1px solid var(--border);
    color: var(--foreground);
    width: 100%;
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.input-field::placeholder {
    color: var(--muted-foreground);
}

.input-field:focus {
    border-color: var(--accent);
    outline: none;
}

.input-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--foreground);
}

/* Custom Button Component */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 3rem;
    /* h-12 */
    background-color: var(--accent);
    color: var(--accent-foreground);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    font-size: 0.875rem;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 3rem;
    /* h-12 */
    background-color: var(--muted);
    color: var(--foreground);
    border: 1px solid var(--border);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    font-size: 0.875rem;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    background-color: #202020;
}

.btn-secondary:active {
    transform: translateY(1px);
}

/* Custom Date Pickers */
input[type="date"]::-webkit-calendar-picker-indicator {
    background-color: var(--accent);
    padding: 5px;
    cursor: pointer;
    border-radius: 2px;
    color: black;
    /* Invert filter to make the default black icon visible if accent is light, or just use the background */
}

/* Range sliders */
input[type="range"] {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    background: var(--accent);
    cursor: pointer;
    margin-top: -6px;
    /* align center with track */
    box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--accent);
}

input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: var(--border);
}

input[type="range"]:focus {
    outline: none;
}