/* Preloader - WeLoveIT.Education
   Barevnost i typografie vychází ze styly/style.css (#1b1a20, #4f77aa, #eee, Montserrat + IBM Plex Mono) */

/* Zámek posuvníku po dobu načítání */
html.is-loading, html.is-loading body { overflow: hidden;}

/* Vlastní plocha preloaderu */
.preloader { width: 100%; height: 100%; position: fixed; top: 0; left: 0; z-index: 9999; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; background: #eee; transition: opacity .35s ease-in-out, visibility .35s ease-in-out;}
.preloader::before { content: ''; width: 900px; height: 900px; max-width: 160%; max-height: 160%; position: absolute; border-radius: 100%; background: radial-gradient(circle, rgba(79,119,170,.20) 0%, rgba(79,119,170,0) 70%);}
.preloader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none;}

/* Pojistka - kdyby se js/preloader.js vůbec nenačetl, plocha po 15 s zmizí */
.preloader { animation: preloader-failsafe 1ms linear 15s forwards;}

/* Obsah preloaderu */
.preloader-face { width: 340px; height: auto; position: relative; display: flex; flex-wrap: wrap; align-content: center; justify-content: center;}

/* Logo */
.preloader-logo { width: 195px; height: 60px; margin: 0 0 26px 0; background: url('../themes/logo.png') top no-repeat; background-size: cover; animation: preloader-in .5s ease-in-out both;}

/* Textová linka ve stylu příkazové řádky */
.preloader-title { width: 100%; font-size: 20px; font-family: 'IBM Plex Mono', monospace; font-weight: 300; color: #1b1a20; text-align: center; margin: 0 0 34px 0; padding: 0 0 22px 0; background: url('../themes/wave.png') bottom center no-repeat; background-size: auto 14px; animation: preloader-in .5s ease-in-out .1s both;}
.preloader-title strong { font-weight: 600; color: #4f77aa;}
.preloader-prompt { color: #4f77aa; font-weight: 600;}
.preloader-caret { width: 9px; height: 18px; margin: 0 0 0 4px; display: inline-block; vertical-align: -3px; background: #4f77aa; animation: preloader-caret 1s steps(1, end) infinite;}

/* Ukazatel průběhu */
.preloader-bar { width: 260px; height: 6px; overflow: hidden; border-radius: 30px; background: rgba(27,26,32,.12); animation: preloader-in .5s ease-in-out .2s both;}
.preloader-bar-fill { width: 100%; height: 6px; border-radius: 30px; background: #4f77aa; transform: scaleX(0); transform-origin: left center;}
.preloader-percent { width: 100%; font-size: 14px; font-weight: 600; letter-spacing: .08em; color: #666; text-align: center; margin: 14px 0 0 0; animation: preloader-in .5s ease-in-out .2s both;}

/* Animace */
@keyframes preloader-in { from { opacity: 0; transform: translateY(10px);} to { opacity: 1; transform: translateY(0);}}
@keyframes preloader-caret { 0%, 50% { opacity: 1;} 50.01%, 100% { opacity: 0;}}
@keyframes preloader-failsafe { to { opacity: 0; visibility: hidden;}}

/* Tablety a menší notebooky */
@media screen and (max-width: 768px) {
    .preloader-face { width: 280px;}
    .preloader-logo { width: 165px; height: 51px; margin: 0 0 22px 0;}
    .preloader-title { font-size: 17px; margin: 0 0 30px 0; padding: 0 0 18px 0; background-size: auto 12px;}
    .preloader-bar { width: 220px;}
}

/* Mobilní telefony */
@media screen and (max-width: 480px) {
    .preloader-face { width: 240px;}
    .preloader-logo { width: 140px; height: 43px; margin: 0 0 20px 0;}
    .preloader-title { font-size: 15px; margin: 0 0 26px 0; padding: 0 0 16px 0; background-size: auto 10px;}
    .preloader-caret { width: 8px; height: 14px; vertical-align: -2px;}
    .preloader-bar { width: 180px;}
    .preloader-percent { font-size: 13px;}
}

/* Omezený pohyb - vypnutí animací */
@media (prefers-reduced-motion: reduce) {
    .preloader, .preloader-logo, .preloader-title, .preloader-bar, .preloader-percent, .preloader-caret { animation: none !important; transition: none !important;}
    .preloader.is-hidden { display: none;}
}
