﻿@import "/UI/Core/Styles/Theme.scss";
MapVoteOverlay {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    color: rgba( 255, 255, 255, 0.9 );
    pointer-events: none;
    @include menu-font-body();

    .map-vote-overlay {
        pointer-events: none;
    }

    .map-vote-overlay:not(.is-minimized) {
        pointer-events: all;
    }

    .map-vote-shell {
        width: 100%;
        height: 100%;
        min-height: 0;
        padding: 16px;
        pointer-events: none;
        justify-content: center;
        align-items: center;
    }

    .map-vote-panel {
        @include menu-surface-glass();
        width: 100%;
        max-height: 100%;
        min-height: 0;
        pointer-events: all;
        gap: 10px;
        border-color: rgba( 255, 255, 255, 0.2 );
        background-color:rgba(59, 53, 53, 0.6);
    }

    .map-vote-topbar {
        width: 100%;
        align-items: center;
        gap: 10px;
        padding-bottom: 2px;
    }

    .map-vote-title-wrap {
        min-width: 0;
        flex-grow: 1;
        gap: 2px;
    }

    .map-vote-title {
        @include menu-eyebrow( $color: rgba( 255, 255, 255, 0.92 ), $size: 16px, $tracking: 2.6px );
    }

    .map-vote-subtitle {
        @include menu-copy( $size: 12px, $color: rgba( 255, 255, 255, 0.72 ), $tracking: 0.5px );
    }

    .map-vote-timer-block {
        min-width: 120px;
        align-items: flex-end;
        gap: 1px;
    }

    .map-vote-timer-label {
        @include menu-copy( $size: 11px, $color: rgba( 255, 255, 255, 0.68 ), $tracking: 1.2px );
        text-transform: uppercase;
    }

    .map-vote-timer-value {
        color: rgba( 255, 255, 255, 0.96 );
        text-shadow: none;
        font-family: "Dinish", "Dinish-Regular", "Dinish-Bold";
        font-size: 26px;
        font-weight: 600;
        letter-spacing: 0.8px;
    }

    UIButton .ui-button.map-vote-minimize-action {
        min-width: 120px;
        justify-content: center;
        text-transform: uppercase;
        letter-spacing: 1.2px;
    }

    .map-vote-status-row {
        width: 100%;
        gap: 8px;
        border-radius: 6px;
        border: 1px solid rgba( 255, 255, 255, 0.14 );
        background-color: rgba( 0, 0, 0, 0.22 );
        padding: 10px 12px;
    }

    .map-vote-status {
        color: rgba( 255, 255, 255, 0.9 );
        text-shadow: none;
        font-size: 13px;
        font-weight: 500;
        letter-spacing: 0.4px;
    }

    .map-vote-status-detail {
        @include menu-copy( $size: 11px, $color: rgba( 255, 255, 255, 0.78 ), $tracking: 0.8px );
        text-transform: uppercase;
    }

    .map-vote-grid {
        width: 100%;
        min-height: 0;
        flex-grow: 1;
        gap: 10px;
        align-content: flex-start;
        justify-content: center;
        overflow-y: scroll;
        padding-right: 4px;
    }

    .map-vote-card {
        @include menu-surface-alt();
        width: 290px;
        height: 380px;
        max-height: 380px;
        padding: 0;
        flex-direction: column;
        overflow: hidden;
        border-color: rgba( 255, 255, 255, 0.18 );
        transition: transform 0.12s ease, border-color 0.12s ease, background-color 0.12s ease, opacity 0.16s ease;
        cursor: pointer;
    }

    .map-vote-card-image {
        width: 290px;
        height: 290px;
        background-color: rgba( 255, 255, 255, 0.04 );
        background-size: 100% 100%;
        background-position: center;
        border-bottom: 1px solid rgba( 255, 255, 255, 0.16 );
        display: flex;
        align-items: flex-start;
        justify-content: flex-end;
        padding: 8px;
    }

    .map-vote-card-badge {
        @include menu-copy( $size: 10px, $color: rgba( 255, 255, 255, 0.95 ), $tracking: 1.2px );
        border-radius: 999px;
        border: 1px solid rgba( 255, 255, 255, 0.26 );
        background-color: rgba( 0, 0, 0, 0.46 );
        padding: 2px 8px;
        text-transform: uppercase;
    }

    .map-vote-card-badge--leader {
        border-color: rgba( $traitor-red, 0.68 );
        background-color: rgba( $traitor-red, 0.18 );
    }

    .map-vote-card-badge--winner {
        border-color: rgba( $counter-terror-color, 0.72 );
        background-color: rgba( $counter-terror-color, 0.18 );
    }

    .map-vote-card-badge--loser {
        border-color: rgba( 255, 255, 255, 0.16 );
        background-color: rgba( 0, 0, 0, 0.35 );
    }

    .map-vote-card-body {
        width: 100%;
        height: 90px;
        max-height: 90px;
        padding: 10px 12px;
        flex-direction: column;
        gap: 3px;
        overflow: hidden;
    }

    .map-vote-card-title {
        color: rgba( 255, 255, 255, 0.94 );
        text-shadow: none;
        font-family: "Dinish", "Dinish-Regular", "Dinish-Bold";
        font-size: 13px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.9px;
    }

    .map-vote-card-org {
        @include menu-copy( $size: 12px, $color: rgba( 255, 255, 255, 0.74 ), $tracking: 0.4px );
    }

    .map-vote-card-vote-row {
        width: 100%;
        margin-top: 6px;
        align-items: center;
        gap: 8px;
    }

    .map-vote-card-vote-count {
        @include menu-copy( $size: 12px, $color: rgba( 255, 255, 255, 0.84 ), $tracking: 0.6px );
        text-transform: uppercase;
        flex-shrink: 0;
    }

    .map-vote-card-avatars {
        margin-left: auto;
        align-items: center;
        gap: 4px;
        overflow: hidden;
    }

    .map-vote-card-avatars .avatar {
        width: 24px;
        height: 24px;
        border-radius: 999px;
        border: 1px solid rgba( 255, 255, 255, 0.45 );
    }

    .map-vote-card-avatar-overflow {
        @include menu-copy( $size: 11px, $color: rgba( 255, 255, 255, 0.78 ), $tracking: 0.4px );
        margin-left: 3px;
    }

    .map-vote-card:hover:not(.is-locked) {
        transform: translateY( -1px );
        border-color: rgba( 255, 255, 255, 0.28 );
        background-color: rgba( 255, 255, 255, 0.06 );
    }

    .map-vote-card.is-clicking {
        transform: scale( 0.985 );
    }

    .map-vote-card.is-leading:not(.is-winner) {
        border-color: rgba( $traitor-red, 0.62 );
    }

    .map-vote-card.is-local-vote {
        border-color: rgba( $counter-terror-color, 0.54 );
    }

    .map-vote-card.is-winner {
        border-color: rgba( $counter-terror-color, 0.72 );
        background-color: rgba( $counter-terror-color, 0.1 );
    }

    .map-vote-card.is-loser {
        opacity: 0.58;
    }

    .map-vote-card.is-vote-animating {
        animation: map-vote-card-pulse 0.45s ease-out;
    }

    .map-vote-card.is-locked {
        cursor: default;
    }

    @keyframes map-vote-card-pulse {
        0% {
            transform: scale( 0.985 );
        }

        55% {
            transform: scale( 1.01 );
        }

        100% {
            transform: scale( 1 );
        }
    }

    .map-vote-footer {
        width: 100%;
        gap: 10px;
        padding-top: 2px;
        align-items: center;
    }

    .map-vote-note {
        @include menu-copy( $size: 11px, $color: rgba( 255, 255, 255, 0.58 ), $tracking: 0.4px );
    }

    UIButton .ui-button.map-vote-leave-action {
        min-width: 120px;
        align-items: center;
        gap: 6px;
    }

    UIButton .ui-button.map-vote-error {
        pointer-events: none;
        justify-content: center;
    }

    .map-vote-minimized {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX( -50% );
        background-color: rgba( 0, 0, 0, 0.8 );
        border-radius: 8px;
        padding: 12px 18px;
        border: 2px solid rgba( 255, 255, 255, 0.2 );
        box-shadow: 0 4px 12px rgba( 0, 0, 0, 0.5 );
        pointer-events: none;
        cursor: default;
        transition: background-color 0.12s ease, border-color 0.12s ease;

        .key-hint {
            background-color: rgba( 255, 255, 255, 0.2 );
            padding: 4px 12px;
            border-radius: 4px;
            border: 1px solid rgba( 255, 255, 255, 0.3 );
            font-size: 14px;
            text-transform: uppercase;
            min-width: 32px;
            text-align: center;
        }
    }

    .map-vote-minimized-title {
        @include menu-copy( $size: 12px, $color: rgba( 255, 255, 255, 0.88 ), $tracking: 1px );
        text-transform: uppercase;
    }

    .map-vote-minimized-timer {
        @include menu-copy( $size: 12px, $color: rgba( 255, 255, 255, 0.82 ), $tracking: 0.8px );
        text-transform: uppercase;
    }

    .map-vote-minimized:hover {
        background-color: rgba( 0, 0, 0, 0.9 );
        border-color: rgba( 255, 255, 255, 0.3 );
    }

    .map-vote-overlay.is-minimized .map-vote-shell {
        display: none;
    }
}
