/* declutter.css - loaded last. Calms the in-game screen (see public/js/declutter.js).
   --dc-header-bottom / --dc-chip-bottom are set by declutter.js from the real layout. */

/* 1. "X HAS KNOCKED" - a slim pill under the header that fades away (the Knock button keeps saying it) */
body #knock-alert-modal {
    top: calc(var(--dc-header-bottom, 108px) + 6px) !important;
    padding: 3px 14px !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.02em;
    border-radius: 999px !important;
    pointer-events: none !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
    animation: dc-fade 4s forwards;
}

/* 2. Status banner: smaller, below the knock pill, never over the header buttons */
body #center-notification-banner,
body .notification-pill {
    top: calc(var(--dc-header-bottom, 108px) + 38px) !important;
    font-size: 0.72rem !important;
    padding: 3px 12px !important;
    opacity: 0.94;
}

/* 3. "Picked discard" / "took your" chips: compact, sitting just above the hand (not over the cards), fading after a few seconds */
body #discard-pickup-topleft-modal,
body #fed-card-topright-modal {
    bottom: var(--dc-chip-bottom, 200px) !important;
    padding: 2px 6px !important;
    gap: 4px !important;
    animation: dc-fade 7s forwards;
}
body #discard-pickup-topleft-modal .modal-label { font-size: 0 !important; flex: 0 0 auto !important; }
body #discard-pickup-topleft-modal .modal-label::before { content: '📥'; font-size: 0.8rem; }
body #fed-card-label,
body #discard-pickup-card-content > span {
    font-size: 0.62rem !important;
}

/* 4. My own seat does not repeat my hand while the hand is being played */
body[data-dc-state="playing"] .dc-mine .seat-cards,
body[data-dc-state="finalTurn"] .dc-mine .seat-cards {
    display: none !important;
}

@keyframes dc-fade {
    0%, 82% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
    body #knock-alert-modal, body #discard-pickup-topleft-modal, body #fed-card-topright-modal { animation-duration: 0.01s; animation-delay: 6s; }
}

/* 5. Compact in-game header: title row, then "turn banner + End Match/Leave" on ONE row,
      then ONE row of tools (the three text-only buttons become icons). */
body #game-view .in-game-header {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 2px 6px !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;
}
body #game-view .in-game-header .header-left {
    flex: 1 0 100% !important;
    justify-content: center !important;
}
body #game-view .in-game-header .header-center {
    flex: 1 1 auto !important;
    text-align: left !important;
    min-width: 0;
}
body #game-view .in-game-header .header-right {
    flex: 0 0 auto !important;
}
body #game-view #in-game-top-row-btns {
    flex-wrap: nowrap !important;
    width: auto !important;
    gap: 4px !important;
}
body #game-view #in-game-top-row-btns button {
    padding: 3px 9px !important;
    font-size: 0.72rem !important;
    white-space: nowrap;
}
body #game-view #in-game-tools-row {
    flex-wrap: nowrap !important;
    gap: 4px !important;
    justify-content: center !important;
}
body #game-view #in-game-tools-row .tool-btn {
    padding: 4px 9px !important;
    white-space: nowrap;
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* icon-only: hide the word, show the emoji */
body #chat-toggle-btn, body #board-btn, body #rules-btn { font-size: 0 !important; }
body #chat-toggle-btn::before { content: '💬'; font-size: 0.95rem; }
body #board-btn::before { content: '📋'; font-size: 0.95rem; }
body #rules-btn::before { content: '📜'; font-size: 0.95rem; }
@media (max-width: 380px) {
    body #game-view #in-game-tools-row .tool-btn { padding: 4px 6px !important; font-size: 0.68rem !important; }
}

/* 6. Open Side Bets drawer: the minimize button hides the list and leaves just the header */
body #global-side-bets-sidebar.minimized { height: auto !important; min-height: 0 !important; bottom: auto !important; }
body #global-side-bets-sidebar.minimized .drawer-body { display: none !important; }
