/* ============================================
   WDT30.Games - Shared Game Container & Zoom
   ============================================ */

/* Page container - fills parent, toolbar stays at top */
.game-page {
    height: 100%;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: var(--kendo-font-family, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif);
    color: #ffffff;
    user-select: none;
    -webkit-user-select: none;
    box-sizing: border-box;
}

/* Toolbar - single-line, unified layout */
.game-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    flex-wrap: nowrap;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 40px;
    backdrop-filter: blur(4px);
    z-index: 100;
    flex-shrink: 0;
    overflow-x: auto;
    overflow-y: hidden;
}

/* Thin scrollbar for toolbar overflow */
.game-toolbar::-webkit-scrollbar {
    height: 3px;
}
.game-toolbar::-webkit-scrollbar-track {
    background: transparent;
}
.game-toolbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.game-toolbar-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #d4af37;
    margin-right: 4px;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    flex-shrink: 0;
}

.game-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: rgba(212, 175, 55, 0.12);
    color: #ffffff;
    border-radius: var(--kendo-border-radius-md, 5px);
    cursor: pointer;
    font-size: 0.8rem;
    font-family: inherit;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.game-toolbar-btn:hover:not(:disabled) {
    background: rgba(212, 175, 55, 0.28);
    border-color: #d4af37;
    color: #f0e6c0;
    transform: translateY(-1px);
}

.game-toolbar-btn:disabled {
    opacity: 0.35;
    cursor: default;
    transform: none;
}

.game-toolbar-btn.active {
    background: rgba(212, 175, 55, 0.35);
    border-color: #d4af37;
    color: #f0e6c0;
}

.game-toolbar-stat {
    font-size: 0.8rem;
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.game-toolbar-stat strong {
    color: #d4af37;
}

/* Difficulty buttons */
.game-diff-group {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.game-diff-btn {
    padding: 3px 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--kendo-border-radius-md, 4px);
    background: rgba(255, 255, 255, 0.06);
    color: #d0d4d8;
    font-size: 0.75rem;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.game-diff-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.game-diff-active {
    background: rgba(212, 175, 55, 0.28) !important;
    border-color: #d4af37 !important;
    color: #f0e6c0 !important;
    font-weight: 600;
}

/* Exit button */
.game-exit-btn {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: #d0d4d8;
    margin-right: 2px;
}

.game-exit-btn:hover:not(:disabled) {
    background: rgba(244, 67, 54, 0.2);
    border-color: rgba(244, 67, 54, 0.5);
    color: #ef9a9a;
    transform: translateY(-1px);
}

/* Zoom controls - compact icon buttons */
.game-zoom-control {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    flex-shrink: 0;
}

.game-zoom-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #d0d4d8;
    border-radius: var(--kendo-border-radius-md, 4px);
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.15s ease;
    padding: 0;
    line-height: 1;
}

.game-zoom-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.4);
    color: #f0e6c0;
}

.game-zoom-btn:active {
    transform: scale(0.92);
}

.game-zoom-auto {
    font-size: 0.85rem;
}

/* Zoom content area - scrollable when content overflows */
.game-zoom-area {
    flex: 1;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 10px 8px 4px;
    align-self: stretch;
    width: 100%;
}

/* Scrollbar styling for game area */
.game-zoom-area::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.game-zoom-area::-webkit-scrollbar-track {
    background: transparent;
}

.game-zoom-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.game-zoom-area::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.game-zoom-content {
    transform-origin: top center;
    transition: transform 0.15s ease;
}

/* Status bar */
.game-status-bar {
    padding: 8px 20px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    flex-shrink: 0;
}

.game-status-won {
    background: rgba(76, 175, 80, 0.15);
    color: #81c784;
}

.game-status-lost {
    background: rgba(244, 67, 54, 0.15);
    color: #e57373;
}

.game-status-info {
    background: rgba(33, 150, 243, 0.1);
    color: #90caf9;
}

/* Responsive toolbar */
@media (max-width: 1024px) {
    .game-toolbar {
        padding: 4px 8px;
        gap: 6px;
    }
    .game-toolbar-title { font-size: 0.95rem; }
    .game-toolbar-btn { padding: 3px 7px; font-size: 0.75rem; }
    .game-toolbar-stat { font-size: 0.75rem; padding: 2px 6px; }
    .game-diff-btn { padding: 2px 6px; font-size: 0.72rem; }
    .game-zoom-btn { width: 26px; height: 26px; font-size: 0.9rem; }
}
