﻿#gameStatsDialog {
    position: absolute;
    width: 1080px;
    height: 300px;
    border-radius: 15px;
    box-shadow: 0px 0px 15px 5px black;
    padding: 10px;
    cursor: all-scroll;
    z-index: 100;
    overflow: hidden;
    display: none;
    top: 0px;
    left: 0px;
}

#gameInPlayDialog {
    position: absolute;
    width: 1200px;
    height: 225px;
    border-radius: 15px;
    box-shadow: 0px 0px 15px 5px black;
    padding: 10px;
    cursor: all-scroll;
    z-index: 101;
    overflow: hidden;
    display: none;
    top: 0px;
    left: 0px;
}

.gameInPlayDialogSection {
    width: 200px;
    height: 215px;
    float: left;
    overflow-x: hidden;
    overflow-y: auto;
}

.gameInPlayDialogTitle {
    font-size: 20px;
}

#gameVictoryPointsDialog {
    position: absolute;
    width: 300px;
    height: 325px;
    border-radius: 15px;
    box-shadow: 0px 0px 15px 5px black;
    padding: 10px;
    cursor: all-scroll;
    z-index: 103;
    overflow: hidden;
    display: none;
    top: 0px;
    left: 0px;
}

#gameVictoryPointsTitle {
    width: 280px;
    margin-right: auto;
    margin-left: auto;
    overflow: hidden;
    margin-bottom: 5px;
    height: 50px;
    text-align: center;
    font-size: 20px;
}

#gameVictoryPointsData {
    width: 280px;
    margin-right: auto;
    margin-left: auto;
    overflow-x: hidden;
    overflow-y: auto;
    height: 265px;
    text-align: center;
    font-size: 20px;
}

#gameCardsDialog {
    position: absolute;
    width: 1230px;
    height: 555px;
    border-radius: 15px;
    box-shadow: 0px 0px 15px 5px black;
    padding: 10px;
    cursor: all-scroll;
    z-index: 102;
    overflow: hidden;
    display: none;
    left: 50%;
    margin-left: -615px;
    top: 200px;
}

#gameTrashDialog {
    position: absolute;
    width: 1230px;
    height: 555px;
    border-radius: 15px;
    box-shadow: 0px 0px 15px 5px black;
    padding: 10px;
    cursor: all-scroll;
    z-index: 102;
    overflow: hidden;
    display: none;
    left: 50%;
    margin-left: -615px;
    top: 200px;
}

#gameSetAsideDialog {
    position: absolute;
    width: 1230px;
    height: 555px;
    border-radius: 15px;
    box-shadow: 0px 0px 15px 5px black;
    padding: 10px;
    cursor: all-scroll;
    z-index: 102;
    overflow: hidden;
    display: none;
    left: 50%;
    margin-left: -615px;
    top: 200px;
}

#gameCardsDialogData {
    width: 1220px;
    height: 550px;
    overflow-x: hidden;
    overflow-y: auto;
    margin-left: auto;
    margin-right: auto;
}

#gameTrashDialogData {
    width: 1220px;
    height: 550px;
    overflow-x: hidden;
    overflow-y: auto;
    margin-left: auto;
    margin-right: auto;
}

#gameSetAsideDialogData {
    width: 1220px;
    height: 550px;
    overflow-x: hidden;
    overflow-y: auto;
    margin-left: auto;
    margin-right: auto;
}

#cardHoverDialog{
    width: 300px;
    height: 250px;
    overflow: hidden;
    position: absolute;
    box-shadow: 0px 0px 15px 5px black;
    border-radius: 15px;
    z-index: 150;
    top: 10px;
    left: 1560px;
    display: none;
}

#selectCardsDialog {
    position: absolute;
    width: 920px;
    height: 400px;
    border-radius: 15px;
    box-shadow: 0px 0px 15px 5px black;
    padding: 10px;
    cursor: all-scroll;
    z-index: 150;
    overflow: hidden;
    display: none;
    left: 50%;
    margin-left: -460px;
    top: 100px;
}

/* Lobby replay browser -- a card-selection-style popup listing recorded games.
 * Centered over the lobby (overlapping the patch notes) and scaled with the
 * body transform, so it works on touch devices. */
#replayBrowserDialog {
    position: absolute;
    left: 50%;
    margin-left: -450px;
    top: 150px;
    width: 900px;
    height: 620px;
    border-radius: 15px;
    box-shadow: 0px 0px 15px 5px black;
    padding: 14px 18px;
    z-index: 200;
    overflow: hidden;
    /* A COLUMN, so the list absorbs whatever the fixed rows above and below it leave over. The
       tab strip and the search row sit between the title and the list, and hard-coded heights
       would have to be re-derived by hand every time one of them changes.
       replayShowBrowser sets display:flex -- jQuery's .show() writes display:block inline when
       the stylesheet's display is none, which would beat this rule. */
    display: none;
    flex-direction: column;
    box-sizing: border-box;
}

.replayBrowserTitle {
    flex: 0 0 auto;
    height: 40px;
    font-size: 30px;
    font-weight: bold;
    text-align: center;
}

/* Dominion / Monopoly Deal. Active state is .openedTab, the themed class the lobby's own tab
   strip already uses, so this needs no light/dark rules of its own. */
.replayBrowserTabs {
    flex: 0 0 auto;
    display: flex;
    gap: 6px;
    margin-top: 4px;
    border-bottom: 2px solid rgba(128, 128, 128, 0.5);
}

.replayTab {
    min-width: 170px;
    height: 30px;
    line-height: 30px;
    padding: 0px 14px;
    cursor: pointer;
    text-align: center;
    font-size: 19px;
    border-radius: 6px 6px 0px 0px;
}

.replayBrowserSearch {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

/* Takes the slack. min-width:0 is what lets it actually shrink -- a flex item's default
   min-width:auto floors it at its content width, which would push the clear button off the row. */
#replaySearchInput {
    flex: 1 1 auto;
    min-width: 0;
    box-sizing: border-box;
    font-size: 18px;
    padding: 6px 10px;
    border: 1px solid rgba(128, 128, 128, 0.6);
    border-radius: 6px;
    background: transparent;
    color: inherit;
}

#replaySearchInput::placeholder {
    color: inherit;
    opacity: 0.5;
}

/* Hidden rather than removed while the box is empty, so the row does not reflow the moment a
   first character is typed. */
#replaySearchClear {
    flex: 0 0 auto;
    font-size: 16px;
    padding: 5px 12px;
    cursor: pointer;
    visibility: hidden;
}

/* A fixed width holds the row still as the count changes from "3 of 29" to "12 of 29". */
#replaySearchCount {
    flex: 0 0 auto;
    min-width: 6em;
    text-align: right;
    font-size: 16px;
    opacity: 0.7;
    white-space: nowrap;
}

.replayBrowserList {
    /* No fixed height: it takes what the column has left. min-height:0 is required -- the default
       min-height:auto floors a flex item at its content height, so a long list would push the
       dialog open instead of scrolling inside it. */
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 8px;
    overflow-y: auto;
}

.replayBrowserButtons {
    flex: 0 0 auto;
    height: 40px;
    margin-top: 10px;
    text-align: center;
}

.replayBrowserButtons input[type="button"] {
    font-size: 22px;
    padding: 5px 34px;
}

/* Each recorded game is one large, full-width tappable row. */
.replayRow {
    display: block;
    box-sizing: border-box;
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    margin-bottom: 10px;
    border: 1px solid #808080;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
}

.replayRow:hover, .replayRow:focus {
    background: rgba(128, 128, 128, 0.18);
    outline: none;
}

/* Already opened by this account. Dimmed, not hidden -- a watched game is still worth re-watching,
   and removing rows would make the list shuffle under the cursor. The dim is deliberately mild so
   the row stays readable; the tag is what actually states it. */
.replayRowWatched {
    opacity: 0.62;
}

.replayRowWatched:hover, .replayRowWatched:focus {
    opacity: 1;
}

/* Green reads as "done" in both themes at this weight, and is not otherwise used on a row tag. */
.replayWatchedTag {
    color: #6fbf73;
    font-weight: bold;
    white-space: nowrap;
}

.replayRowMeta {
    opacity: 0.7;
    font-size: 15px;
    margin-top: 4px;
}

.replayAiTag {
    color: #e6a23c;
    font-weight: bold;
}

/* Crazy mode is a different game rather than a harder one (a 10x supply), so it reads as a name. */
.replayFunTag {
    color: #c678dd;
    font-weight: bold;
}

/* A game long enough to have been recorded per turn instead of per action. Stated plainly so the
 * coarser stepping is understood as a property of the recording, not a fault in the viewer. */
.replayTurnStepsTag {
    color: #7fb3d5;
    font-weight: bold;
}

/* --- Replay list rows ---------------------------------------------------------------------
 * Two lines that use the width they already had: line 1 is what you scan a list by (who, who
 * won, how long, how recently), line 2 what you read once a row has caught your eye (the id to
 * quote, the score, the board). Both wrap rather than truncate -- a kingdom is ten card names
 * and a row that hid half of them would defeat the point of listing it. */
.replayRowMain {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
}

.replayRowMain .replaySep {
    opacity: 0.35;
}

/* The players are the widest part and the first thing read, so they take the slack. */
.replayRowMain .replayPlayers {
    flex: 1 1 auto;
    min-width: 0;
}

/* Names arrive as server-rendered colour spans; keep them legible against this row. */
.replayName {
    font-weight: 600;
}

.replayRowMain .replayTurns,
.replayRowMain .replayAge {
    opacity: 0.75;
    white-space: nowrap;
}

.replayRowMeta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
}

/* Meant to be read out loud and typed, so: monospace, boxed, and selectable on its own. */
.replayUid {
    font-family: "Courier New", monospace;
    letter-spacing: 0.08em;
    padding: 0 6px;
    border: 1px solid rgba(128, 128, 128, 0.5);
    border-radius: 4px;
    user-select: all;
    opacity: 0.9;
}

.replayScore {
    font-weight: 600;
    opacity: 0.9;
}

/* The kingdom is the longest thing here and the least urgent: it takes what is left and wraps. */
.replayKingdom {
    flex: 1 1 100%;
    opacity: 0.8;
    font-size: 0.9em;
}

.replayEmpty {
    text-align: center;
    opacity: 0.7;
    font-size: 20px;
    margin-top: 60px;
}

/* Small confirmation dialog for the coin-token / end-phase action icons. */
#confirmActionDialog {
    position: absolute;
    left: 50%;
    margin-left: -280px;
    top: 340px;
    width: 560px;
    border-radius: 15px;
    box-shadow: 0px 0px 15px 5px black;
    padding: 28px 24px;
    z-index: 300;
    text-align: center;
    display: none;
}

.confirmActionText {
    font-size: 28px;
    margin-bottom: 26px;
}

.confirmActionButtons input[type="button"] {
    font-size: 24px;
    padding: 8px 36px;
    margin: 0 12px;
}

.selectCardDialogText {
    width: 920px;
    height: 25px;
    border-radius: 15px;
    text-align: center;
}

.selectCardDialogData {
    width: 920px;
    height: 340px;
    margin-top: 5px;
    text-align: center;
    overflow-y: auto;
}

.selectCardDialogButtons {
    /*width: 800px;*/
    height: 25px;
    margin-top: 5px;
    text-align: center;
}

.publicPlayerStatsDiv {
    float: left;
}

.publicPlayerStatContainer {
    display: block;
    overflow: hidden;
    height: 33px;
    line-height: 20px;
    width: 180px;
}

.publicPlayerIcon {
    width: 30px;
    display: inline-block;
    vertical-align: middle;
}

.publicPlayerStat {
    display: inline-block;
    vertical-align: middle;
    line-height: normal;
    font-size: 20px;
}

.disconnectDialog {
    display: none;
    position: absolute;
    width: 400px;
    height: 100px;
    left: 50%;
    margin-left: -200px;
    border-radius: 15px;
    box-shadow: 0px 0px 15px 5px black;
    padding: 10px;
    cursor: all-scroll;
    z-index: 200;
    text-align: center;
    overflow: hidden;
    top: 0px;
}

#endOfGameDialog {
    position: absolute;
    width: 1250px;
    height: 400px;
    border-radius: 15px;
    box-shadow: 0px 0px 15px 5px black;
    padding: 10px;
    cursor: all-scroll;
    z-index: 150;
    overflow: hidden;
    display: none;
    top: 200px;
    left: 50%;
    margin-left: -625px;
}

#endOfGameDialogText {
    width: 1240px;
    height: 25px;
    text-align: center;
    margin-right: auto;
    margin-left: auto;
    overflow: hidden;
}

#endOfGameDialogData {
    width: 1240px;
    height: 330px;
    margin-top: 5px;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}


#endOfGameDialogButtons {
    width: 1240px;
    height: 25px;
    margin-right: auto;
    margin-left: auto;
    margin-top: 10px;
    float: left;
    text-align: center;
}

#gameDeckCompositionDialog {
    position: absolute;
    width: 300px;
    height: 325px;
    border-radius: 15px;
    box-shadow: 0px 0px 15px 5px black;
    padding: 10px;
    cursor: all-scroll;
    z-index: 104;
    overflow: hidden;
    display: none;
    top: 0px;
    left: 0px;
}

#gameDeckCompositionTitle {
    width: 280px;
    margin-right: auto;
    margin-left: auto;
    overflow: hidden;
    margin-bottom: 5px;
    height: 35px;
    text-align: center;
    font-size: 20px;
}

#gameDeckCompositionData {
    width: 280px;
    margin-right: auto;
    margin-left: auto;
    overflow-x: hidden;
    overflow-y: auto;
    height: 280px;
    text-align: center;
    font-size: 20px;
}
