/* Weather Alert Banner - Custom Font Declarations */

/* Metropolis Bold - Primary Custom Font */

/* Roboto, Inter and Poppins are self-hosted (SIL Open Font License 1.1). They used to be @imported from Google Fonts,
   which made every graphic page wait on three external stylesheets before it could finish loading. */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('./Roboto-400-latin.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;
}

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('./Roboto-500-latin.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;
}

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('./Roboto-700-latin.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;
}

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('./Roboto-900-latin.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;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url('./Inter-400-900-latin.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;
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('./Poppins-400-latin.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;
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('./Poppins-500-latin.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;
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('./Poppins-600-latin.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;
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('./Poppins-700-latin.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;
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('./Poppins-800-latin.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;
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('./Poppins-900-latin.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;
}

/* Note: Metropolis is a premium font. For production use, add the actual @font-face declarations */
/* Example of how to add Metropolis when you have the font files:
@font-face {
    font-family: 'Metropolis';
    src: url('./Metropolis-Bold.woff2') format('woff2'),
         url('./Metropolis-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Metropolis';
    src: url('./Metropolis-Black.woff2') format('woff2'),
         url('./Metropolis-Black.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}
*/

@font-face {
    font-family: 'Metropolis';
    src: local('Metropolis Bold'), local('Metropolis Black'), local('Metropolis');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Metropolis';
    src: local('Metropolis Black'), local('Metropolis Bold'), local('Metropolis');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* Font Family Definitions with Fallbacks */
:root {
    /* Primary font stacks with fallbacks */
    --font-metropolis: 'Metropolis', sans-serif;
    --font-inter: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-roboto: 'Roboto', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-poppins: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-system: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Font weight definitions */
    --weight-normal: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;
    --weight-extrabold: 800;
    --weight-black: 900;
    
    /* Dynamic font size variables */
    --banner-font-size-small: 18px;
    --banner-font-size-normal: 24px;
    --banner-font-size-large: 30px;
    --banner-font-size-xlarge: 36px;
    
    --popup-font-size-small: 20px;
    --popup-font-size-normal: 26px;
    --popup-font-size-large: 32px;
    --popup-font-size-xlarge: 38px;
    
    --areas-font-size-small: 16px;
    --areas-font-size-normal: 20px;
    --areas-font-size-large: 26px;
    --areas-font-size-xlarge: 32px;
    
    --time-font-size-small: 14px;
    --time-font-size-normal: 18px;
    --time-font-size-large: 22px;
    --time-font-size-xlarge: 26px;
}

/* Font Family Classes */
.font-metropolis {
    font-family: var(--font-metropolis) !important;
}

.font-inter {
    font-family: var(--font-inter) !important;
}

.font-roboto {
    font-family: var(--font-roboto) !important;
}

.font-poppins {
    font-family: var(--font-poppins) !important;
}

.font-system {
    font-family: var(--font-system) !important;
}

/* Font Weight Classes */
.weight-normal { font-weight: var(--weight-normal) !important; }
.weight-medium { font-weight: var(--weight-medium) !important; }
.weight-semibold { font-weight: var(--weight-semibold) !important; }
.weight-bold { font-weight: var(--weight-bold) !important; }
.weight-extrabold { font-weight: var(--weight-extrabold) !important; }
.weight-black { font-weight: var(--weight-black) !important; }

/* Font Size Classes */
.size-small {
    --current-banner-size: var(--banner-font-size-small);
    --current-popup-size: var(--popup-font-size-small);
    --current-areas-size: var(--areas-font-size-small);
    --current-time-size: var(--time-font-size-small);
}

.size-normal {
    --current-banner-size: var(--banner-font-size-normal);
    --current-popup-size: var(--popup-font-size-normal);
    --current-areas-size: var(--areas-font-size-normal);
    --current-time-size: var(--time-font-size-normal);
}

.size-large {
    --current-banner-size: var(--banner-font-size-large);
    --current-popup-size: var(--popup-font-size-large);
    --current-areas-size: var(--areas-font-size-large);
    --current-time-size: var(--time-font-size-large);
}

.size-xlarge {
    --current-banner-size: var(--banner-font-size-xlarge);
    --current-popup-size: var(--popup-font-size-xlarge);
    --current-areas-size: var(--areas-font-size-xlarge);
    --current-time-size: var(--time-font-size-xlarge);
}

/* Apply font sizes dynamically */
.alert-banner .alert-type,
.alert-banner .alert-title {
    font-size: var(--current-banner-size, var(--banner-font-size-normal)) !important;
}

.alert-banner .alert-areas {
    font-size: var(--current-areas-size, var(--areas-font-size-normal)) !important;
}

.alert-banner .alert-time,
.alert-banner .alert-until {
    font-size: var(--current-time-size, var(--time-font-size-normal)) !important;
}

.popup-overlay .popup-badge,
.popup-overlay .popup-title {
    font-size: var(--current-popup-size, var(--popup-font-size-normal)) !important;
}

/* Font smoothing for better text rendering */
.font-metropolis,
.font-inter,
.font-roboto,
.font-poppins {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Letter spacing adjustments for different fonts */
.font-metropolis {
    letter-spacing: -0.02em;
}

.font-inter {
    letter-spacing: -0.01em;
}

.font-roboto {
    letter-spacing: 0;
}

.font-poppins {
    letter-spacing: -0.01em;
}

/* Special styling for popup "NEW ALERT" badge */
.popup-badge.font-metropolis {
    font-weight: var(--weight-black) !important;
    letter-spacing: 0.02em;
}

.popup-badge.font-inter {
    font-weight: var(--weight-extrabold) !important;
}

.popup-badge.font-roboto,
.popup-badge.font-poppins {
    font-weight: var(--weight-black) !important;
}