/* ==========================================
   SalmasFlix — Games · Guess the Drawing
   Extracted from games.css in Phase 7.9 (2026-04-23).
   Originally at lines 5573-5738 of the monolith.

   Phased (draw -> guess) partner-only game with canvas
   drawing + guess input + guess list. All rules scoped to
   `.gtd-*` classes.

   Shared with WYR (lives in games-wyr.css, loaded before this):
   - `.wyr-timer-bar, .gtd-timer-bar` timer rule
   - `.wyr-result-*` result card classes
   Responsive rule `@media (max-width: 480px) .gtd-*`
   included here from the old WYR+GTD RESPONSIVE section.
   ========================================== */

@layer features {


.gtd-container {
    position: relative;
}

.gtd-area {
    padding: clamp(4px, 1vw, 12px);
    min-height: 200px;
}

.gtd-word-banner {
    text-align: center;
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    padding: 8px 16px;
    background: rgba(var(--primary-rgb),0.1);
    border: 1px solid rgba(var(--primary-rgb),0.3);
    border-radius: 8px;
    margin-bottom: 8px;
    color: var(--primary);
}

.gtd-hint-banner {
    text-align: center;
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-family: monospace;
    letter-spacing: 4px;
    padding: 8px 16px;
    background: rgba(var(--secondary-rgb),0.1);
    border: 1px solid rgba(var(--secondary-rgb),0.3);
    border-radius: 8px;
    margin-bottom: 8px;
    color: var(--secondary);
    min-height: 40px;
}

.gtd-canvas-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    max-height: min(45vh, 40dvh);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
@media (max-height: 700px) {
    .gtd-canvas-wrap { max-height: 35dvh; }
}

.gtd-canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
}

.gtd-tools {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    padding: 6px 10px;
    border-radius: 20px;
}

.gtd-tool {
    background: none;
    border: 2px solid transparent;
    color: var(--text-primary, #fff);
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.15s, background-color 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s, filter 0.15s, opacity 0.15s, transform 0.15s;
}

.gtd-tool.active, .gtd-tool:hover {
    border-color: var(--secondary-alt);
    background: rgba(var(--secondary-alt-rgb),0.2);
}

.gtd-color-input {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: none;
    padding: 0;
}

.gtd-size-slider {
    width: 60px;
    accent-color: var(--secondary-alt);
}

.gtd-guess-area {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.gtd-guess-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-primary, #fff);
    font-size: 0.95rem;
    outline: none;
}

.gtd-guess-input:focus {
    border-color: var(--secondary-alt);
}

.gtd-guesses {
    max-height: 100px;
    overflow-y: auto;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.gtd-guess-item {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary, #ccc);
}

.gtd-guess-item.gtd-guess-correct {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    font-weight: 700;
}

.gtd-answer {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    margin-top: 8px;
    color: var(--text-primary, #fff);
}

.gtd-guesser {
    font-size: 0.85rem;
    color: var(--text-muted, #888);
    margin-top: 4px;
}

/* Mobile adjustments (from the old WYR + GTD RESPONSIVE block). */
@media (max-width: 480px) {
    .gtd-canvas-wrap {
        max-height: 35vh;
    }
    .gtd-tools {
        gap: 4px;
        padding: 4px 8px;
    }
    .gtd-size-slider {
        width: 40px;
    }
}


} /* end @layer features */
