﻿/* ============================================
   Phoenix Activation System - Base Styles
   CSS Reset & Global Styles
   ============================================ */

/* ========== The Inter font (T-20261030-03 D2) ==========
   Served from our own server (wwwroot/fonts/inter/, the licence in OFL.txt there): Inter v20 of Google Fonts,
   the variable font with the weights 400-700 in one file per subset. The unicode-range lines are Google's:
   a page loads latin-ext only for a text with such a letter. Arabic letters are not in Inter: the browser
   takes them from the next font of --font-sans. App.razor preloads the latin file (the same URL: one download). */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/inter/inter-latin-ext-wght.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/inter/inter-latin-wght.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ========== CSS Reset ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 100%; /* the browser's root size (16px by default); the rem tokens count from it */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========== Typography ========== */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: var(--font-size-4xl);
}

h2 {
    font-size: var(--font-size-3xl);
}

h3 {
    font-size: var(--font-size-2xl);
}

h4 {
    font-size: var(--font-size-xl);
}

h5 {
    font-size: var(--font-size-lg);
}

h6 {
    font-size: var(--font-size-base);
}

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

@media (hover: hover) {
    a:hover {
        color: var(--color-primary-hover);
    }
}

strong, b {
    font-weight: var(--font-weight-semibold);
}

small {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

/* ========== Lists ========== */
ul, ol {
    list-style: none;
}

/* ========== Images ========== */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========== Forms ========== */
button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

input:focus, textarea:focus, select:focus {
    outline: none;
}

/* ========== Tables ========== */
table {
    width: 100%;
    border-collapse: collapse;
}

/* ========== Scrollbar Styling ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-medium);
    border-radius: var(--radius-full);
}

@media (hover: hover) {
    ::-webkit-scrollbar-thumb:hover {
        background: var(--color-dark);
    }
}

/* The selection colour is in phoenix.css (one copy). */

/* ========== Utility Classes ========== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.grid {
    display: grid;
}
