/* "/public/alpha/Desert-Storm-WMD-Sweeper/style.css" */

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #8d7343;
    font-family: Arial, Helvetica, sans-serif;
}

canvas {
    display: block;
    width: 100vw;
    height: 100vh;
    image-rendering: pixelated;
    touch-action: manipulation;
}

#gamepadCursor {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 2147483647;
    pointer-events: none;
    image-rendering: pixelated;
}

body.gamepad-input-active,
body.gamepad-input-active *,
body.custom-cursor-active,
body.custom-cursor-active * {
    cursor: none !important;
}

#hud {
    min-height: 16px;
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    z-index: 5;
    color: #f1dfaa;
    background: rgba(0, 0, 0, .58);
    border-bottom: 2px solid #8f7442;
    padding: 2px 6px;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    gap: 8px;
    flex-wrap: wrap;
    pointer-events: none;
}

#hud b {
    color: #fff3c4;
}

#clock {
    line-height: 16px;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: .06em;
}

#hud select,
#hud input,
#hud button {
    height: 16px;
    min-height: 16px;
    font: inherit;
    margin-top: 0;
    pointer-events: auto;
    background: #67522d;
    color: #fff3c4;
    border: 1px solid #bca36d;
    padding: 1px 6px;
    cursor: pointer;
    font-weight: bold;
}

#gamepad-config-status {
    color: #ffdf8d;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#gamepad-config-status.config-error {
    color: #ff9d8d;
}

#dsw-gamepad-config-notice {
    position: fixed;
    left: 50%;
    top: 34px;
    transform: translateX(-50%);
    z-index: 40;
    max-width: min(92vw, 720px);
    padding: 8px 12px;
    border: 2px solid #bca36d;
    background: rgba(29, 22, 10, .94);
    color: #fff3c4;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    white-space: pre-line;
    pointer-events: none;
    opacity: 0;
    transition: opacity .18s ease;
}

#dsw-gamepad-config-notice.active { opacity: 1; }
#dsw-gamepad-config-notice.error { border-color: #ff9d8d; color: #ffd0c7; }

#gamepadOverlay {
    position: fixed;
    right: 8px;
    bottom: 8px;
    z-index: 17;
    min-width: 220px;
    max-width: min(360px, 92vw);
    box-sizing: border-box;
    display: none;
    padding: 8px;
    border: 2px solid #bca36d;
    background: rgba(0, 0, 0, .68);
    color: #fff3c4;
    font-size: 12px;
    line-height: 1.25;
    pointer-events: none;
}

#gamepadOverlay.open { display: block; }
#gamepadOverlay b { color: #ffffff; }
#gamepadOverlay .active { color: #ffffff; text-shadow: 0 0 6px #fff3c4; }

#rankingsOverlay {
    position: fixed;
    inset: 0;
    z-index: 18;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, .56);
    color: #fff3c4;
    pointer-events: auto;
}

#rankingsOverlay.open {
    display: flex;
}

#rankingsPanel {
    width: min(92vw, 720px);
    max-height: min(84vh, 640px);
    overflow: auto;
    box-sizing: border-box;
    border: 2px solid #bca36d;
    background: rgba(40, 30, 12, .95);
    box-shadow: 0 0 24px rgba(0, 0, 0, .75);
    padding: 12px;
    font-size: 14px;
    line-height: 1.35;
}

#rankingsPanel h2 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #ffffff;
}

#rankingsPanel table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    table-layout: fixed;
}

#rankingsPanel th,
#rankingsPanel td {
    border-bottom: 1px solid rgba(188, 163, 109, .45);
    padding: 4px 6px;
    text-align: left;
    white-space: nowrap;
}

#rankingsPanel th:nth-child(1),
#rankingsPanel td:nth-child(1) {
    width: 44px;
}

#rankingsPanel th:nth-child(2),
#rankingsPanel td:nth-child(2) {
    width: 72px;
}

#rankingsPanel th:nth-child(3),
#rankingsPanel td:nth-child(3) {
    width: 84px;
}

#rankingsPanel th:nth-child(4),
#rankingsPanel td:nth-child(4) {
    width: 136px;
}

#rankingsPanel th:nth-child(6),
#rankingsPanel td:nth-child(6) {
    width: 78px;
}

#rankingsPanel .rankings-specs {
    font-size: 12px;
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: anywhere;
}

#rankingsPanel th {
    color: #ffffff;
}

#rankingsPanel .rankings-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

#rankingsPanel button {
    min-height: 24px;
    padding: 2px 10px;
    border: 1px solid #bca36d;
    background: #67522d;
    color: #fff3c4;
    font: inherit;
    font-weight: bold;
    cursor: pointer;
}


#osk {
    position: fixed;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    z-index: 20;
    max-width: min(96vw, 720px);
    box-sizing: border-box;
    padding: 6px;
    border: 2px solid #bca36d;
    background: rgba(0, 0, 0, .78);
    color: #fff3c4;
    font-size: 12px;
    font-weight: bold;
    display: none;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

#osk.open {
    display: flex;
}

#osk .osk-title {
    flex: 1 0 100%;
    text-align: center;
    color: #ffffff;
    margin-bottom: 2px;
}

#osk button {
    min-width: 30px;
    min-height: 24px;
    padding: 2px 6px;
    border: 1px solid #bca36d;
    background: #67522d;
    color: #fff3c4;
    font: inherit;
    font-weight: bold;
    cursor: pointer;
}

#osk button.osk-wide {
    min-width: 64px;
}

#osk button.osk-key-pressed {
    background: #fff3c4;
    color: #2d210f;
    border-color: #ffffff;
    transform: translateY(1px);
}
