/* Standardize */
html, body {
    max-height: 100vh;
    height: auto;
    padding: 0;
}

body {
    background-color: var(--n50);
    color: var(--n700);
    margin: 0;
    font-family: var(--astv-font-family), sans-serif;
}

p, h1, h2, h3, h4, h5, h6 {
    margin: 0;
}

a {
    color: var(--n700);
}

/* Fonts */
@font-face {
    font-family: "Agrandir";
    src: url("../font/agrandir-variable.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* Constants */
:root {

    /* Fonts */
    --astv-font-family: "Agrandir", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

    /* Colors - Primary (Taevasinine) */
    --t50:  #E4F4FF;
    --t100: #D6ECFB;
    --t200: #ADD9F7;
    --t300: #85C6F3;
    --t400: #5CB4EF;
    --t500: #33A1EB;
    --t600: #2796E6;
    --t700: #2471A4;
    --t800: #1F628F;

    /* Colors - Secondary (Võrserohline) */
    --v50:  #F1FFF2;
    --v100: #D7F5D8;
    --v200: #AFECB1;
    --v300: #88E289;
    --v400: #38CF3B;
    --v500: #227E24;

    /* Colors - Tertiary (Jääsinine) */
    --j50:  #ECFCFA;
    --j100: #D1F3F5;
    --j200: #A2E7EC;
    --j200a: #74dae2;
    --j300: #45ced8;
    --j300a: #17C2CF;
    --j400: #0E767E;

    /* Colors - Neutral */
    --semantic-surface-white-60: rgba(255, 255, 255, 0.60);
    --semantic-surface-white-23: rgba(214, 236, 251, 0.23);
    --semantic-surface-white-10: rgba(214, 236, 251, 0.1);
    --n50: #F3F8F9;
    --n100: #E6EBED;
    --n200: #CED7DC;
    --n300: #9DAEB9;
    --n400: #6c8695;
    --n500: #3B5E72;
    --n600: #062537;
    --n700: #09354F;

    /* Colors - Success */
    --success-weak:   #D7F5D8;
    --success-base:   #38CF3B;
    --success-strong: #025804;

    /* Colors - Caution */
    --caution-weak:   #FFF8E0;
    --caution-base:   #F8DB03;
    --caution-strong: #A67800;

    /* Colors - Error */
    --error-weak:   #FFEFF2;
    --error-base:   #E22124;
    --error-strong: #940505;

}

/* Colors as classes */
.n700 {
    color: var(--n700);
}

.error-strong {
    color: var(--error-strong);
}

/* Headings */
.default-h1 {
    font-size: 32px;
    font-weight: 500;
    line-height: 120%;
    letter-spacing: 0;
}

.default-h2 {
    font-size: 28px;
    font-weight: 500;
    line-height: 120%;
    letter-spacing: 0;
}

.default-h3 {
    font-size: 24px;
    font-weight: 500;
    line-height: 120%;
    letter-spacing: 0;
}

.default-h4 {
    font-size: 18px;
    font-weight: 500;
    line-height: 140%;
    letter-spacing: 0;
}

.default-h5 {
    font-size: 16px;
    font-weight: 500;
    line-height: 140%;
    letter-spacing: 0;
}

.default-h6 {
    font-size: 14px;
    font-weight: 500;
    line-height: 140%;
    letter-spacing: 0.05em;
}

/* Paragraphs */
.default-body-lg {
    font-size: 18px;
    font-weight: 500;
    line-height: 150%;
    letter-spacing: 0;
}

.default-body-md-semibold {
    font-size: 16px;
    font-weight: 600;
    line-height: 150%;
    letter-spacing: 0;
}

.default-body-md {
    font-size: 16px;
    font-weight: 500;
    line-height: 150%;
    letter-spacing: 0;
}

.default-body-sm {
    font-size: 14px;
    font-weight: 500;
    line-height: 150%;
    letter-spacing: 0;
}

.default-body-xs {
    font-size: 12px;
    font-weight: 500;
    line-height: 120%;
    letter-spacing: 0;
}

.badge-base {
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 120%;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.badge-sm {
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    line-height: 120%;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.helper-base {
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%; /* 14.4px */
    letter-spacing: 0;
}

.ui-base {
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 140%; /* 19.6px */
    letter-spacing: 0;
}

.ui-sm {
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    line-height: 120%; /* 14.4px */
    letter-spacing: 0;
}

/* Helpers */
.font-sans {
    font-family: font-sans, sans-serif;
}

.default-font {
    font-family: var(--astv-font-family), sans-serif;
}

.astv-link {
    color: var(--n700);
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 140%; /* 19.6px */
    letter-spacing: 0.05em;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: auto;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
    text-underline-position: from-font;
}

.underline {
    text-decoration: underline;
}

.info-banner {
    width: fit-content;
    padding: 6px 12px;
    border-radius: 100px;
    background: var(--t100);
}

.info-banner-sm {
    padding: 5px 8px;
    border-radius: 8px;
    background: var(--t100);
}

.caution-banner-sm {
    padding: 5px 8px;
    border-radius: 8px;
    color: #703800;
    background: #FCECDA;
}

.success-banner-sm {
    padding: 5px 8px;
    border-radius: 8px;
    color: #21592A;
    background: #E1EFE2;
}

.error-banner-sm {
    padding: 5px 8px;
    border-radius: 8px;
    color: #890B0B;
    background: #F8E2E2;
}

.form-field-label {
    font-family: var(--astv-font-family), sans-serif;
}

.form-field-header {
    display: flex;
    justify-content: space-between;
    padding: 0 8px;
}

.divider {
    border: 1px solid var(--n100);
}

.flex {
    display: flex;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.gap-2 {
    gap: 2px;
}

.gap-8 {
    gap: 8px;
}

.gap-12 {
    gap: 12px;
}

.gap-16 {
    gap: 16px;
}

.gap-24 {
    gap: 24px;
}

.gap-40 {
    gap: 40px;
}

.gap-48 {
    gap: 48px;
}

.flex-1 {
    flex: 1;
}

.flex-2 {
    flex: 2;
}

.flex-3 {
    flex: 3;
}

.flex-4 {
    flex: 4;
}

.align-center {
    align-items: center;
}

.align-flex-start {
    align-items: flex-start;
}

.space-between {
    justify-content: space-between;
}

.space-around {
    justify-content: space-around;
}

.bottom-message {
    height: 21px;
}

.full-width {
    width: 100%;
}

.itp-link {
    text-decoration: underline;
}

.itp-link:hover {
    cursor: pointer;
}