/* =============================================================================
   WSPÓLNE STYLE DLA WSZYSTKICH ZEGARÓW
   ============================================================================= */

@font-face {
    font-family: 'DigiClock';
    src: url('../fonts/DigiClock.woff2') format('woff2'),
         url('../fonts/DigiClock.woff') format('woff'),
         url('../fonts/DigiClock.svg#DigiClock') format('svg'),
         url('../fonts/DigiClock.eot'),
         url('../fonts/DigiClock.eot?#iefix') format('embedded-opentype'),
         url('../fonts/DigiClock.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
}

/* Domyślne tło dla zegara klasycznego */
body.skin-classic {
    background-image: url(../clock-assets/classic/background.jpg);
    background-image: image-set(url(../clock-assets/classic/background.webp) type("image/webp"), url(../clock-assets/classic/background.jpg) type("image/jpeg"));
    background-size: cover;
    background-attachment: fixed;
}

/* Czarne tło dla zegara Teleexpressu */
body.skin-teleexpress {
    background-color: #000;
}

/* Niebieskie tło dla zegarów TVP */
body.skin-tvp-1993,
body.skin-tvp-krakow {
    background: rgb(0, 32, 197);
}

/* Tło z obrazem dla TVP 2012 */
body.skin-tvp-2012 {
    background-image: url(../clock-assets/tvp-2012/background.jpg);
    background-image: image-set(url(../clock-assets/tvp-2012/background.webp) type("image/webp"), url(../clock-assets/tvp-2012/background.jpg) type("image/jpeg"));
    background-size: cover;
    background-attachment: fixed;
}

#clocks-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
    padding-top: 3vh;
    padding-bottom: 5vh;
    transform: scale(0.95);
}

#controls-toggle {
    position: fixed;
    top: 10px;
    right: 10px;
    background-color: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    z-index: 1001;
    transition: background-color 0.3s ease;
}

#controls-toggle:hover {
    background-color: rgba(0,0,0,0.9);
}

#controls {
    position: fixed;
    top: 50px;
    right: 10px;
    background-color: rgba(0,0,0,0.9);
    padding: 15px;
    border-radius: 5px;
    color: white;
    z-index: 1000;
    max-height: 80vh;
    overflow-y: auto;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#controls.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
}

#controls label {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    display: block;
    margin: 5px 0;
    cursor: pointer;
}

#controls select {
    background-color: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 5px;
    border-radius: 3px;
    font-size: 14px;
    width: 100%;
    margin-top: 5px;
}

#controls select option {
    background-color: #333;
    color: white;
}

#sync-status {
    position: fixed;
    top: 10px;
    left: 10px;
    background-color: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-family: Arial, sans-serif;
    font-size: 12px;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.5s ease;
}

#sync-status.syncing {
    animation: pulse-sync 2s ease-in-out infinite;
}

@keyframes pulse-sync {
    0%, 100% {
        background-color: rgba(0, 0, 0, 0.7);
    }
    50% {
        background-color: rgba(255, 140, 0, 0.85);
    }
}

#sync-status.hidden {
    opacity: 0;
    pointer-events: none;
}

#version-notification {
    position: fixed;
    top: 60px;
    left: 10px;
    background-color: rgba(0, 120, 200, 0.9);
    color: white;
    padding: 12px 16px;
    border-radius: 5px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    z-index: 1000;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#version-notification:hover {
    background-color: rgba(0, 140, 220, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

#version-notification.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
}

/* Tryb kiosk (?kiosk=1) - panel opcji dostępny pod klawiszem "O" */
body.kiosk #controls-toggle,
body.kiosk #version-notification,
body.kiosk #sync-status:not(.pinned) {
    display: none;
}

body.kiosk #controls {
    top: 10px;
}
