/* Styles for ngt_tracking_server (the player-facing "lane move" mobile page).
   Loaded via useStyleSheet("GUI/css/tracking_server.css") from the doc root. */

.tracking-server-page {
    min-height: 100vh;
    overflow-y: auto;
    padding: clamp(8px, 3vw, 18px);
    box-sizing: border-box;
    background: #111820;
    color: #f6f8fa;
    font-family: Arial, sans-serif;
}

.tracking-server-page,
.tracking-server-page * {
    box-sizing: border-box;
}

.tracking-server-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 180px));
    gap: clamp(8px, 2.5vw, 14px);
    justify-content: center;
    align-content: start;
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: clamp(6px, 2vw, 14px) 0;
}

.tracking-server-game-grid .tracking-server-game-icon-passive,
.tracking-server-game-grid .tracking-server-game-icon-active {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    max-width: none !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    border: 4px solid #96a0aa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .28);
    position: relative;
    touch-action: manipulation;
    transition: filter .12s ease, opacity .12s ease, transform .12s ease, box-shadow .12s ease;
    user-select: none;
    -webkit-tap-highlight-color: rgba(255, 194, 71, .24);
}

.tracking-server-choice-busy .tracking-server-game-icon-passive,
.tracking-server-choice-busy .tracking-server-game-icon-active,
.tracking-server-choice-busy .tracking-server-light-option {
    pointer-events: none;
    cursor: wait;
}

.tracking-server-game-grid .tracking-server-game-icon-passive {
    opacity: .68;
    filter: saturate(.72) brightness(.82);
}

.tracking-server-game-grid .tracking-server-game-icon-active {
    opacity: 1;
    filter: saturate(1.2) brightness(1.08);
    transform: scale(1.035);
    z-index: 1;
    border-color: #ffffff;
    outline: 5px solid #23f0c7;
    outline-offset: -9px;
    box-shadow: 0 0 0 4px rgba(35, 240, 199, .45), 0 0 24px rgba(35, 240, 199, .75), 0 4px 16px rgba(0, 0, 0, .48);
}

.tracking-server-light-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: clamp(12px, 4vw, 22px);
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: clamp(10px, 3vw, 18px) 0 clamp(4px, 1vw, 8px);
}

.tracking-server-light-option {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(54px, 16vw, 72px);
    height: clamp(54px, 16vw, 72px);
    border-radius: 50%;
    border: 4px solid #96a0aa;
    background: #1b2530;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .28);
    cursor: pointer;
    opacity: .68;
    filter: saturate(.72) brightness(.82);
    touch-action: manipulation;
    user-select: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;   /* otherwise mobile webkit paints a square over the circle */
    transition: filter .12s ease, opacity .12s ease, transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.tracking-server-light-option img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;   /* the image clips itself round, so the container needs no overflow:hidden */
}

.tracking-server-light-off-label {
    font-size: clamp(.72rem, 2.8vw, .95rem);
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    color: #f6f8fa;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.tracking-server-light-option-active {
    opacity: 1;
    filter: saturate(1.2) brightness(1.08);
    transform: scale(1.06);
    border-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(35, 240, 199, .45), 0 0 20px rgba(35, 240, 199, .7), 0 4px 14px rgba(0, 0, 0, .45);
}

.tracking-server-choice-pending {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(17, 24, 32, .46);
    backdrop-filter: blur(1.5px);
    pointer-events: all;
}

.tracking-server-choice-spinner {
    width: clamp(58px, 18vw, 82px);
    height: clamp(58px, 18vw, 82px);
    border-radius: 50%;
    border: 6px solid rgba(255, 255, 255, .24);
    border-top-color: #23f0c7;
    box-shadow: 0 0 24px rgba(35, 240, 199, .35), 0 6px 24px rgba(0, 0, 0, .42);
    animation: tracking-server-spin .8s linear infinite;
}

@keyframes tracking-server-spin {
    to {
        transform: rotate(360deg);
    }
}

.tracking-server-center-page {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    background-color: #101820;
    background-image:
        linear-gradient(rgba(16, 24, 32, .34), rgba(16, 24, 32, .34)),
        url("../Icons/tracking_background.svg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

.tracking-server-page .tracking-qr-code {
    width: min(100%, 30rem);
    margin: clamp(18px, 8vh, 72px) auto clamp(14px, 4vh, 32px);
    padding: 12px 16px;
    font-size: clamp(1.2rem, 5vw, 2rem);
    line-height: 1.2;
    border-radius: 8px;
}

.tracking-server-page .tracking-qr-image {
    display: block;
    width: min(70vw, 280px);
    height: auto;
    max-width: none;
    margin: 0 auto;
}

.tracking-server-message-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: min(100%, 38rem);
    min-height: min(68vh, 31rem);
    margin: clamp(22px, 9vh, 78px) auto 0;
    padding: clamp(20px, 7vw, 38px) clamp(18px, 6vw, 34px);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    background: rgba(23, 33, 43, .9);
    box-shadow: 0 14px 42px rgba(0, 0, 0, .32);
    backdrop-filter: blur(2px);
}

.tracking-server-message-graphic {
    display: block;
    width: min(58vw, 220px);
    height: auto;
    max-width: none;
    margin: 0 auto clamp(12px, 4vh, 24px);
}

.tracking-server-message {
    width: 100%;
    margin: 0;
    padding: 0;
    font-size: clamp(2.15rem, 10vw, 4.15rem);
    font-weight: 900;
    line-height: 1.02;
    text-align: center;
    color: #f6f8fa;
}

@media (max-height: 520px) {
    .tracking-server-message-panel {
        min-height: 0;
        margin-top: 12px;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .tracking-server-message-graphic {
        width: min(42vw, 150px);
        margin-bottom: 8px;
    }
}
