/* =========================================================================
   gameManager/MTG/deckOptions.css — ★2026-09-03 batch.

   Three JS-created pieces of in-game chrome (no index.php markup):
     1. #deckOptions — the Options menu that slides out to the LEFT of the
        deck (mechanics/deckOptions.js). The wrap is parked flush against
        the deck's left edge and CLIPS; the sheet inside starts at
        translateX(100%) (tucked under the deck) and slides to 0.
     2. #revealOverlay — "reveal the top N" for everyone at the table.
     3. #actionText — the action bubble (mechanics/actionText.js): the
        #turnBanner pill's exact look (turn.css), now carrying every
        history line.

   Scoping: every selector starts with #deckOptions, .deck-option,
   #revealOverlay, .reveal- or #actionText / .action-text.
   ========================================================================= */

/* ---------------------------------------------------------------------
   1. THE OPTIONS MENU
   z 30 = above the hand strips (2–4), the life dice (6), the turn column
   (7) and the hovered areas (20); below the deck viewer (1000) and every
   overlay. The deck itself (#drawCardArea, in the z-2 hand strip) is what
   the sheet visually emerges from.
   --------------------------------------------------------------------- */
#deckOptions {
    position: fixed;
    z-index: 30;
    overflow: hidden;            /* the clip: the sheet hides "under" the deck */
    padding: 6px 0 6px 8px;      /* room for the sheet's shadow on the open side */
    pointer-events: none;
}

#deckOptions.hidden {
    display: none;
}

#deckOptions .deck-options-sheet {
    pointer-events: auto;
    width: 178px;
    max-width: 100%;
    padding: 6px;
    border-radius: 10px;
    background: rgba(17, 24, 39, 0.94);
    color: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
    transform: translateX(calc(100% + 12px));
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.3, 0.7, 0.25, 1), opacity 0.22s ease;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 13px;
}

#deckOptions.deck-options-open .deck-options-sheet {
    transform: translateX(0);
    opacity: 1;
}

.deck-option-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    height: 34px;
    padding: 0 4px 0 2px;
    border-radius: 7px;
}

.deck-option-row + .deck-option-row {
    margin-top: 2px;
}

.deck-option-label {
    flex: 1 1 auto;
    height: 28px;
    padding: 0 10px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.deck-option-label:hover {
    background: rgba(37, 99, 235, 0.85);
}

.deck-option-label:disabled {
    opacity: 0.4;
    cursor: default;
    background: rgba(255, 255, 255, 0.06);
}

.deck-option-count {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 3px;
}

.deck-option-num {
    min-width: 22px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #ffd27a;
    font-variant-numeric: tabular-nums lining-nums;
}

.deck-option-steps {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.deck-option-step {
    width: 18px;
    height: 13px;
    padding: 0;
    border: none;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    font-size: 8px;
    line-height: 13px;
    cursor: pointer;
    transition: background-color 0.12s ease;
}

.deck-option-step:hover {
    background: rgba(255, 210, 122, 0.45);
}

.deck-option-step:disabled {
    opacity: 0.3;
    cursor: default;
    background: rgba(255, 255, 255, 0.10);
}

/* The Options button stays lit while its menu is out */
.viewDeck.deck-options-active {
    opacity: 1 !important;
    background-color: #1d4ed8;
}

/* ---------------------------------------------------------------------
   2. THE REVEAL OVERLAY — z 9650: above the turn splash (9640) and the
   presentation (9600), below the dice popup (9700) and dialogs (9999).
   Click anywhere (or Escape, or ~9s) closes it.
   --------------------------------------------------------------------- */
#revealOverlay {
    position: fixed;
    inset: 0;
    z-index: 9650;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    background: radial-gradient(ellipse at center, rgba(8, 10, 18, 0.55) 0%, rgba(4, 5, 10, 0.86) 100%);
    opacity: 0;
    transition: opacity 0.28s ease;
    cursor: pointer;
    font-family: Helvetica, Arial, sans-serif;
}

#revealOverlay.reveal-in {
    opacity: 1;
}

#revealOverlay .reveal-caption {
    color: #ffe9a8;
    font-size: clamp(16px, 2.2vw, 26px);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8), 0 0 18px rgba(255, 210, 122, 0.45);
    text-align: center;
    padding: 0 16px;
}

#revealOverlay .reveal-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    max-width: 92vw;
}

#revealOverlay .reveal-card {
    position: relative;
    border-radius: 4.75% / 3.5%;
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.6), 0 0 22px rgba(255, 235, 170, 0.25);
    background: #fff;
    opacity: 0;
    transform: translateY(24px) scale(0.92);
    animation: revealCardIn 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#revealOverlay .reveal-card img {
    display: block;
    width: 100%;
    border-radius: 4.75% / 3.5%;
}

#revealOverlay .reveal-order {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.92);
    color: #ffd27a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

#revealOverlay .reveal-hint {
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@keyframes revealCardIn {
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------------------------------------------------------------------
   3. THE ACTION BUBBLE — #turnBanner's look (turn.css), same spot under
   the opponent's hand; up to three lines, the repeat count in amber.
   --------------------------------------------------------------------- */
#actionText {
    position: fixed;
    top: 13vh;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    z-index: 7;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    max-width: 70vw;
    padding: 6px 18px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.86);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
    white-space: nowrap;
    font-family: Helvetica, Arial, sans-serif;
}

#actionText.action-text-in {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

#actionText.hidden {
    display: none;
}

#actionText .action-text-line {
    display: flex;
    align-items: baseline;
    gap: 6px;
    max-width: 70vw;
    overflow: hidden;
    text-overflow: ellipsis;
}

#actionText .action-text-line:not(:last-child) {
    opacity: 0.62;
    font-size: 12px;
}

#actionText .action-text-count {
    color: #ffd27a;
    font-weight: 800;
    font-variant-numeric: tabular-nums lining-nums;
}

#actionText .action-text-body {
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (prefers-reduced-motion: reduce) {
    #deckOptions .deck-options-sheet,
    #revealOverlay,
    #actionText {
        transition: none;
    }
    #revealOverlay .reveal-card {
        animation: none;
        opacity: 1;
        transform: none;
    }
}
