/* Game Detail modal (window.GameDetailModal). Tokens: variables.css.
   The native <dialog> centers via UA margin:auto, which the global reset.css
   `margin:0` kills — so .gdm-dialog[open] is a full-viewport flex container
   (same proven idiom as greg-week5-modal.css / cancel-class-modal.css). */

.gdm-dialog {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    max-width: 100vw;
    max-height: 100vh;
    color: var(--text-primary, #f3f4f6);
}
.gdm-dialog[open] {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gdm-dialog[hidden] { display: none; }
.gdm-dialog::backdrop {
    background: rgba(0, 0, 0, 0.6);
}

.gdm-panel {
    position: relative;
    max-width: 560px;
    width: calc(100vw - 32px);
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
    background: var(--bg-card, #15151c);
    border: 1px solid var(--border-subtle, #2a2a35);
    border-radius: 14px;
    padding: 22px 22px 20px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

.gdm-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-subtle, #2a2a35);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary, #b6b6c2);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.gdm-close:hover { background: rgba(255, 255, 255, 0.08); color: var(--text-primary, #f3f4f6); }
.gdm-close:focus-visible { outline: 2px solid var(--accent, #2563eb); outline-offset: 2px; }

.gdm-heading {
    margin: 0 40px 6px 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary, #f3f4f6);
    line-height: 1.3;
}

.gdm-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.gdm-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.14);
    color: var(--accent, #2563eb);
    border: 1px solid rgba(37, 99, 235, 0.3);
}
.gdm-tag--disc {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary, #b6b6c2);
    border-color: var(--border-subtle, #2a2a35);
}

.gdm-video { margin-bottom: 14px; }
.gdm-video-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}
.gdm-video-stage iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.gdm-video-watermark {
    position: absolute;
    bottom: 8px;
    right: 10px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.gdm-video-loading {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input, #0f0f15);
    border: 1px solid var(--border-subtle, #2a2a35);
    border-radius: 10px;
    color: var(--text-tertiary, #8a8a96);
    font-size: 0.85rem;
}

.gdm-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.gdm-line {
    display: grid;
    grid-template-columns: 116px 1fr;
    gap: 10px;
    align-items: start;
    font-size: 0.92rem;
    line-height: 1.45;
}
.gdm-line__lbl {
    font-weight: 600;
    color: var(--text-tertiary, #8a8a96);
}
.gdm-line__val { color: var(--text-primary, #f3f4f6); }

.gdm-empty {
    margin: 0;
    color: var(--text-tertiary, #8a8a96);
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    .gdm-line { grid-template-columns: 92px 1fr; gap: 8px; font-size: 0.88rem; }
}

/* Discussion feed game-card affordances (the card lives in community-discussions.css;
   these two are added here so the lazy discussion bundle's CSS stays untouched). */
.cd-card__game-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
}
.cd-card__game-detail {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent, #2563eb);
    cursor: pointer;
    border-radius: 6px;
    padding: 2px 2px;
}
.cd-card__game-detail:hover { text-decoration: underline; }
.cd-card__game-detail:focus-visible { outline: 2px solid var(--accent, #2563eb); outline-offset: 2px; }

/* "View details" button on the coach→student focus chip (siblings: .focus-game-change /
   .focus-game-remove, styled in coach-student CSS; this added here to avoid bumping it). */
.focus-game-details {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent, #2563eb);
    cursor: pointer;
    border-radius: 6px;
}
.focus-game-details:hover { text-decoration: underline; }
.focus-game-details:focus-visible { outline: 2px solid var(--accent, #2563eb); outline-offset: 2px; }
