/* ========================================
   Golden Aurea Casino - Font Optimization
   Version: 1.0 - Optimize font loading performance
   ======================================== */

/* Optimized font-face declarations with font-display: swap */
@font-face {
    font-family: 'GTWalsheimPro-Regular';
    src: url('../fonts/_src/GTWalsheimPro-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap; /* Prevents slow network warnings */
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'GTWalsheimPro-Bold';
    src: url('../fonts/_src/GTWalsheimPro-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap; /* Prevents slow network warnings */
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'GTWalsheimPro-Medium';
    src: url('../fonts/_src/GTWalsheimPro-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap; /* Prevents slow network warnings */
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'GTWalsheimPro-Light';
    src: url('../fonts/_src/GTWalsheimPro-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap; /* Prevents slow network warnings */
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Font fallback strategy */
body, 
html {
    font-family: 'GTWalsheimPro-Regular', 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-display: swap;
}

/* Optimize font loading for critical elements */
.modal-base__title,
.registry-modal__form-ttl,
h1, h2, h3, h4, h5, h6 {
    font-family: 'GTWalsheimPro-Bold', 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-display: swap;
}

/* Button text optimization */
.button,
.modal .button-secondary,
.modal .button-primary,
.modal .button-neutral {
    font-family: 'GTWalsheimPro-Medium', 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-display: swap;
}

/* Input field optimization */
.input-elem {
    font-family: 'GTWalsheimPro-Regular', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-display: swap;
}

/* Font loading state management */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    transition: font-family 0.3s ease;
}

body.fonts-loaded {
    font-family: 'GTWalsheimPro-Regular', 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Prevent layout shift during font loading */
* {
    font-display: swap;
}

/* Optimize font loading with size-adjust for better performance */
@font-face {
    font-family: 'GTWalsheimPro-Regular';
    src: url('../fonts/_src/GTWalsheimPro-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    size-adjust: 100%;
    ascent-override: 100%;
    descent-override: 20%;
    line-gap-override: 0%;
}
