@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300..900&display=swap');

/* ========================================
   TYPOGRAPHY STYLES
   Material Design 3 typography scale
   ======================================== */

/* ========== FONT VARIABLES ========== */

:root {
    --font-title: var(--font-body);
    --font-body: "Inter", "Segoe UI", Arial, sans-serif;
}

/* MudBlazor typography: :root:root outranks MudThemeProvider's :root variables */
:root:root {
    --mud-typography-default-family: var(--font-body);
    --mud-typography-h1-family: var(--font-body);
    --mud-typography-h2-family: var(--font-body);
    --mud-typography-h3-family: var(--font-body);
    --mud-typography-h4-family: var(--font-body);
    --mud-typography-h5-family: var(--font-body);
    --mud-typography-h6-family: var(--font-body);
    --mud-typography-subtitle1-family: var(--font-body);
    --mud-typography-subtitle2-family: var(--font-body);
    --mud-typography-body1-family: var(--font-body);
    --mud-typography-body2-family: var(--font-body);
    --mud-typography-button-family: var(--font-body);
    --mud-typography-caption-family: var(--font-body);
    --mud-typography-overline-family: var(--font-body);
    /* Shared Cantivos type scale */
    --mud-typography-default-size: 0.875rem;
    --mud-typography-default-weight: 400;
    --mud-typography-body1-size: 0.875rem;
    --mud-typography-body1-weight: 400;
    --mud-typography-body2-size: 0.875rem;
    --mud-typography-body2-weight: 400;
    --mud-typography-subtitle1-size: 0.875rem;
    --mud-typography-subtitle1-weight: 600;
    --mud-typography-subtitle2-size: 0.8125rem;
    --mud-typography-subtitle2-weight: 600;
    --mud-typography-button-size: 0.875rem;
    --mud-typography-button-weight: 500;
    --mud-typography-caption-size: 0.75rem;
    --mud-typography-caption-weight: 400;
}

/* Shared component text not covered by MudTypography variables */
.mud-input,
.mud-input input,
.mud-input textarea,
.mud-select-input,
.mud-nav-link,
.mud-table-cell {
    font-size: 0.875rem;
}

/* MudInput values inherit subtitle1 (600); keep values regular and labels medium */
.mud-input > input.mud-input-root,
.mud-input > textarea.mud-input-root,
.mud-input-slot.mud-input-root,
.mud-select-input {
    font-weight: 400;
}

.mud-input-control > .mud-input-control-input-container > .mud-input-label-inputcontrol {
    font-weight: 500;
}

.mud-nav-link .mud-nav-link-text {
    font-weight: 500;
}

.mud-table-head .mud-table-cell {
    font-size: 0.8125rem;
    font-weight: 600;
}

.mud-chip {
    font-size: 0.8125rem;
}

/* ========== BASE TYPOGRAPHY ========== */

h1, h2, h3, h4, h5 {
    font-family: var(--font-title);
    font-weight: 600;
    line-height: 1.2;
}

body, p, span, input, button {
    font-family: var(--font-body);
    line-height: 1.5;
}

body, p {
    font-weight: 400;
}

/* ========== DISPLAY TYPOGRAPHY ========== */

.text-display-large {
    font-family: var(--font-title);
    font-weight: 400;
    font-size: clamp(3.5rem, 8vw, 5.7rem);
    line-height: 1.12;
    letter-spacing: -0.25px;
}

.text-display-medium {
    font-family: var(--font-title);
    font-weight: 400;
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    line-height: 1.15;
    letter-spacing: 0;
}

.text-display-small {
    font-family: var(--font-title);
    font-weight: 400;
    font-size: clamp(2.25rem, 5vw, 3.6rem);
    line-height: 1.22;
    letter-spacing: 0;
}

/* ========== HEADLINE TYPOGRAPHY ========== */

.text-headline-large {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.25;
    letter-spacing: 0;
}

.text-headline-medium {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: clamp(1.75rem, 3.5vw, 2.8rem);
    line-height: 1.28;
    letter-spacing: 0;
}

.text-headline-small {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    line-height: 1.33;
    letter-spacing: 0;
}

/* ========== TITLE TYPOGRAPHY ========== */

.text-title-large {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: clamp(1.375rem, 2.5vw, 2.2rem);
    line-height: 1.27;
    letter-spacing: 0;
}

.text-title-medium {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: clamp(1.125rem, 2vw, 1.6rem);
    line-height: 1.5;
    letter-spacing: 0.15px;
}

.text-title-small {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: clamp(1rem, 1.75vw, 1.4rem);
    line-height: 1.43;
    letter-spacing: 0.1px;
}

/* ========== BODY TYPOGRAPHY ========== */

.text-body-large {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.75vw, 1.6rem);
    line-height: 1.5;
    letter-spacing: 0.5px;
}

.text-body-medium {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.875rem, 1.5vw, 1.4rem);
    line-height: 1.43;
    letter-spacing: 0.25px;
}

.text-body-small {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.75rem, 1.25vw, 1.2rem);
    line-height: 1.33;
    letter-spacing: 0.4px;
}

/* ========== LABEL TYPOGRAPHY ========== */

.text-label-large {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: clamp(0.875rem, 1.5vw, 1.4rem);
    line-height: 1.43;
    letter-spacing: 0.1px;
}

.text-label-medium {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: clamp(0.75rem, 1.25vw, 1.2rem);
    line-height: 1.33;
    letter-spacing: 0.5px;
}

.text-label-small {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: clamp(0.6875rem, 1.125vw, 1.1rem);
    line-height: 1.45;
    letter-spacing: 0.5px;
}

/* ========== UTILITY TYPOGRAPHY ========== */

.text-overline {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: clamp(0.625rem, 1vw, 1rem);
    line-height: 1.6;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.text-caption {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.75rem, 1.25vw, 1.2rem);
    line-height: 1.33;
    letter-spacing: 0.4px;
    color: var(--md-sys-color-on-surface-variant);
}

/* ========== TEXT UTILITIES ========== */

.text-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-center-input input {
    text-align: center;
}