/* Wordament Game Styles - 4x4 grid word game with Enhanced Desktop Drag Support */

.wordament-game-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.wordament-header {
    text-align: center;
    margin-bottom: 20px;
}

.wordament-title {
    color: #2c5aa0;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c5aa0;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.timer {
    color: #d63384;
    font-family: monospace;
}

.timer.warning {
    color: #dc3545;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 4x4 Grid Styles with Enhanced Desktop Drag Support */
.wordament-grid-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
}

/* CRITICAL: Maximum specificity override for 4x4 grid layout with enhanced drag support */
html body .wordament-game-container .wordament-grid-container .wordament-grid,
.wordament-grid {
    /* FORCE 4x4 CSS Grid Layout */
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    grid-template-rows: repeat(4, 1fr) !important;
    grid-template-areas: none !important;
    grid-auto-flow: row !important;
    grid-auto-columns: auto !important;
    grid-auto-rows: auto !important;
    gap: 4px !important;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    width: min(400px, 90vw) !important;
    height: min(400px, 90vw) !important;
    /* Enhanced Touch/Drag Support */
    touch-action: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    cursor: grab;
    /* Prevent any flex behavior that could create column layout */
    flex-direction: initial !important;
    flex-wrap: initial !important;
    flex-flow: initial !important;
    /* Prevent Bootstrap container behavior */
    max-width: min(400px, 90vw) !important;
    box-sizing: border-box !important;
    position: relative;
}

/* Enhanced dragging state */
.wordament-grid.dragging {
    cursor: grabbing !important;
}

/* CRITICAL: Maximum specificity override for grid cells with dark cyan background */
html body .wordament-game-container .wordament-grid-container .wordament-grid .wordament-cell,
.wordament-cell {
    position: relative;
    /* CRITICAL: Ensure cells display as flex items within grid */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    /* REQUIREMENT: All tiles dark cyan background */
    background: #008B8B !important;
    color: white !important;
    border: 2px solid #006666 !important;
    border-radius: 8px;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-height: 70px !important;
    font-size: 1.8rem;
    font-weight: bold;
    /* Enhanced Touch/Drag Support */
    touch-action: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    /* Prevent any automatic sizing that could break grid */
    width: auto !important;
    height: auto !important;
    /* Ensure cell stays in grid position */
    grid-column: auto !important;
    grid-row: auto !important;
    /* Prevent Bootstrap column behavior */
    float: none !important;
    clear: none !important;
}

/* Enhanced desktop hover effects - keep dark cyan but slightly lighter on hover */
.wordament-cell:hover:not(.disabled):not(.selected) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 139, 139, 0.3);
    background: #20B2AA !important; /* Light sea green on hover */
}

.wordament-cell.selected {
    background: #000080 !important; /* Dark Blue when selected */
    color: white !important;
    border-color: #0000CD !important; /* Medium Blue border */
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 128, 0.4);
    z-index: 10;
    animation: selectPulse 0.3s ease;
}

/* REQUIREMENT: When selected, change to dark blue - HIGHEST PRIORITY */
html body .wordament-game-container .wordament-grid-container .wordament-grid .wordament-cell.selected,
.wordament-cell.selected {
    background: #000080 !important; /* Dark Blue when selected */
    color: white !important;
    border-color: #0000CD !important; /* Medium Blue border */
    transform: scale(1.05) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 128, 0.4) !important;
    z-index: 10 !important;
    animation: selectPulse 0.3s ease !important;
}

/* CRITICAL: Ensure selected state overrides hover state */
.wordament-cell.selected:hover {
    background: #000080 !important; /* Keep dark blue on hover when selected */
    color: white !important;
    border-color: #0000CD !important;
    transform: scale(1.05) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 128, 0.4) !important;
}

.wordament-cell.highlighted {
    background: #e3f2fd;
    border: 2px solid #2196f3;
}

.wordament-cell.valid-move {
    background: #e8f5e8;
    border: 2px solid #4caf50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
    animation: validMovePulse 1.5s infinite;
}

@keyframes validMovePulse {
    0%, 100% { 
        background: #e8f5e8;
        box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
    }
    50% { 
        background: #f1f9f1;
        box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
    }
}

/* Enhanced drag visual feedback */
.wordament-cell.drag-path {
    background: #fff3cd !important;
    border: 2px solid #ffc107 !important;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3) !important;
    z-index: 10;
}

.wordament-cell.drag-start {
    background: #d4edda !important;
    border: 2px solid #28a745 !important;
    box-shadow: 0 4px 16px rgba(40, 167, 69, 0.4) !important;
}

.wordament-cell.drag-current {
    background: #cce5ff !important;
    border: 2px solid #007bff !important;
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.4) !important;
    animation: dragPulse 1s infinite;
}

@keyframes dragPulse {
    0%, 100% { transform: scale(1.05); }
    50% { transform: scale(1.1); }
}

.wordament-cell.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Desktop-specific drag enhancements */
@media (pointer: fine) {
    .wordament-grid {
        cursor: grab;
    }
    
    .wordament-grid.dragging {
        cursor: grabbing !important;
    }
    
    .wordament-cell {
        cursor: pointer;
    }
    
    .wordament-cell:active:not(.disabled) {
        transform: scale(0.95);
    }
    
    .wordament-grid.dragging .wordament-cell {
        cursor: grabbing !important;
    }
}

/* Current Word Display with enhanced feedback */
.current-word-display {
    text-align: center;
    margin: 15px 0;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.current-word {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c5aa0;
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 25px;
    border: 2px solid #e9ecef;
    min-width: 200px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.current-word.valid {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
    animation: validWordPulse 0.5s ease;
}

@keyframes validWordPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.current-word.invalid {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

/* Game Controls with Icon Fallback Support */
.wordament-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.control-button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* Touch Support */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Icon fallback system - show icons by default, fallback to text if needed */
.control-button .icon-fallback {
    font-size: 16px;
    line-height: 1;
    display: inline;
    margin-right: 4px;
    /* ENHANCED: Better font stack for Unicode symbols */
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', 'Symbola', 'DejaVu Sans', 'Arial Unicode MS', Arial, sans-serif;
    font-variant-emoji: unicode;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Prevent character fallback issues */
    font-feature-settings: normal;
    font-variant: normal;
    font-style: normal;
    font-weight: normal;
}

.control-button .text-fallback {
    display: none;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Show text fallback if browser has poor Unicode support */
.no-emoji-support .control-button .icon-fallback {
    display: none !important;
}

.no-emoji-support .control-button .text-fallback {
    display: inline !important;
}

/* Alternative fallback detection for older browsers */
@supports not (font-feature-settings: "liga") {
    .control-button .icon-fallback {
        display: none !important;
    }
    .control-button .text-fallback {
        display: inline !important;
    }
}

/* Media query fallback for Windows systems that may have font issues */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    .control-button .icon-fallback {
        display: none !important;
    }
    .control-button .text-fallback {
        display: inline !important;
    }
}

/* DEBUGGING: Force text fallback temporarily to test if the system works */
.debug-text-fallback .control-button .icon-fallback {
    display: none !important;
}

.debug-text-fallback .control-button .text-fallback {
    display: inline !important;
}

/* NEW: Additional detection method - check if specific Unicode characters are supported */
@supports not ((font-family: "Apple Color Emoji") or (font-family: "Segoe UI Emoji")) {
    .control-button .icon-fallback {
        display: none !important;
    }
    .control-button .text-fallback {
        display: inline !important;
    }
}

/* COMPATIBILITY: Ensure good rendering on different systems */
@media screen and (min-resolution: 120dpi) {
    .control-button .icon-fallback {
        font-size: 14px; /* Slightly smaller on high DPI */
    }
}

/* Specific button styling improvements */
.submit-button .icon-fallback {
    color: inherit; /* Inherit button color */
}

.clear-button .icon-fallback {
    color: inherit; /* Inherit button color */
}

.new-game-button .icon-fallback {
    color: inherit; /* Inherit button color */
}

.submit-button {
    background: #28a745;
    color: white;
}

.submit-button:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-1px);
}

.clear-button {
    background: #6c757d;
    color: white;
}

.clear-button:hover:not(:disabled) {
    background: #545b62;
    transform: translateY(-1px);
}

.new-game-button {
    background: #007bff;
    color: white;
}

.new-game-button:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-1px);
}

.control-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.control-button:active {
    transform: translateY(0px) scale(0.98);
}

/* Found Words Display with Animation Support */
.found-words-section {
    margin-top: 30px;
}

.found-words-header {
    text-align: center;
    margin-bottom: 15px;
    color: #2c5aa0;
    font-size: 1.3rem;
    font-weight: bold;
}

.found-words-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
}

.found-words-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.found-word-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #28a745;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    animation: fadeInUp 0.3s ease;
    transition: all 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ? NEW: Word celebration animation */
.found-word-item.celebration-bounce {
    animation: wordamentCelebrationBounce 1s ease-in-out;
}

@keyframes wordamentCelebrationBounce {
    0%, 100% { 
        transform: scale(1) translateY(0); 
        background: white;
    }
    25% { 
        transform: scale(1.05) translateY(-5px); 
        background: #e8f5e8;
    }
    50% { 
        transform: scale(1.1) translateY(-10px); 
        background: #d4edda;
        box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
    }
    75% { 
        transform: scale(1.05) translateY(-5px); 
        background: #e8f5e8;
    }
}

.found-word-item.longest-word {
    border-left-color: #ffd700;
    background: #fffbf0;
}

.found-word-item.rare-word {
    border-left-color: #6f42c1;
    background: #f8f5ff;
}

.found-word-item.long-word {
    border-left-color: #fd7e14;
    background: #fff8f0;
}

.found-word-text {
    font-weight: 600;
    color: #2c3e50;
}

.found-word-score {
    color: #28a745;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Game Over Screen */
.game-over-screen {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 1px solid #e9ecef;
    margin: 20px 0;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-over-title {
    font-size: 2rem;
    color: #2c5aa0;
    margin-bottom: 20px;
}

.final-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.final-stat-item {
    text-align: center;
}

.final-stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #28a745;
}

.final-stat-label {
    color: #666;
    margin-top: 5px;
}

/* ? NEW: Word placement and path animation styles */
.wordament-cell.wordament-word-reveal {
    background: #90EE90 !important;
    color: #000 !important;
    border: 3px solid #32CD32 !important;
    box-shadow: 0 0 20px rgba(50, 205, 50, 0.6) !important;
    animation: wordamentWordReveal 1.5s ease-in-out;
    z-index: 15 !important;
}

@keyframes wordamentWordReveal {
    0% { 
        transform: scale(1); 
        background: #90EE90; 
        box-shadow: 0 0 5px rgba(50, 205, 50, 0.3);
    }
    25% { 
        transform: scale(1.15); 
        background: #98FB98; 
        box-shadow: 0 0 15px rgba(50, 205, 50, 0.6);
    }
    50% { 
        transform: scale(1.25); 
        background: #ADFF2F; 
        box-shadow: 0 0 25px rgba(173, 255, 47, 0.8);
    }
    75% { 
        transform: scale(1.15); 
        background: #98FB98; 
        box-shadow: 0 0 15px rgba(50, 205, 50, 0.6);
    }
    100% { 
        transform: scale(1); 
        background: #90EE90; 
        box-shadow: 0 0 5px rgba(50, 205, 50, 0.3);
    }
}

.wordament-cell.wordament-path-flash {
    background: #FFD700 !important;
    color: #000 !important;
    border: 2px solid #FFA500 !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.7) !important;
    animation: wordamentPathFlash 0.8s ease-out;
    z-index: 12 !important;
}

@keyframes wordamentPathFlash {
    0% { 
        background: #FFD700; 
        transform: scale(1);
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.4);
    }
    50% { 
        background: #FFA500; 
        transform: scale(1.1);
        box-shadow: 0 0 20px rgba(255, 165, 0, 0.8);
    }
    100% { 
        background: #FFD700; 
        transform: scale(1);
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.4);
    }
}

/* Mobile Responsiveness - MAINTAIN GRID LAYOUT */
@media (max-width: 768px) {
    .wordament-game-container {
        padding: 10px;
    }
    
    /* CRITICAL: Maintain 4x4 grid on mobile with maximum specificity */
    html body .wordament-game-container .wordament-grid-container .wordament-grid,
    .wordament-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        grid-template-rows: repeat(4, 1fr) !important;
        width: min(350px, 95vw) !important;
        height: min(350px, 95vw) !important;
        padding: 10px;
        gap: 4px !important;
        /* Override any Bootstrap or flex container behavior */
        flex-direction: initial !important;
        flex-wrap: initial !important;
        align-items: initial !important;
        justify-content: initial !important;
    }
    
    /* CRITICAL: Ensure cells remain as grid items with maximum specificity and dark cyan background */
    html body .wordament-game-container .wordament-grid-container .wordament-grid .wordament-cell,
    .wordament-cell {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: row !important;
        /* REQUIREMENT: Dark cyan background on mobile */
        background: #008B8B !important;
        color: white !important;
        border: 2px solid #006666 !important;
        min-height: 60px !important;
        font-size: 1.5rem;
        width: auto !important;
        height: auto !important;
        /* Prevent column behavior */
        flex-basis: auto !important;
        flex-grow: 0 !important;
        flex-shrink: 0 !important;
    }
    
    /* CRITICAL: Ensure selected state works on mobile */
    html body .wordament-game-container .wordament-grid-container .wordament-grid .wordament-cell.selected,
    .wordament-cell.selected {
        background: #000080 !important; /* Dark Blue when selected on mobile */
        color: white !important;
        border-color: #0000CD !important;
        transform: scale(1.05) !important;
        box-shadow: 0 4px 16px rgba(0, 0, 128, 0.4) !important;
        z-index: 10 !important;
    }
    
    .game-stats {
        gap: 15px;
        font-size: 1rem;
    }
    
    .stat-value {
        font-size: 1.3rem;
    }
    
    .current-word-display {
        height: 45px; /* Fixed height for mobile */
    }
    
    .current-word {
        font-size: 1.5rem;
        padding: 6px 16px;
        min-width: 150px;
        height: 40px; /* Fixed height for mobile */
    }
    
    .control-button {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
    
    .found-words-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    /* CRITICAL: Maintain 4x4 grid on small mobile with maximum specificity */
    html body .wordament-game-container .wordament-grid-container .wordament-grid,
    .wordament-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        grid-template-rows: repeat(4, 1fr) !important;
        width: min(300px, 95vw) !important;
        height: min(300px, 95vw) !important;
        gap: 3px !important;
        padding: 8px;
        /* Override any container/flex behavior */
        flex-direction: initial !important;
        flex-wrap: initial !important;
        align-items: initial !important;
        justify-content: initial !important;
    }
    
    /* CRITICAL: Ensure cells remain as grid items on small screens with dark cyan background */
    html body .wordament-game-container .wordament-grid-container .wordament-grid .wordament-cell,
    .wordament-cell {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: row !important;
        /* REQUIREMENT: Dark cyan background on small mobile */
        background: #008B8B !important;
        color: white !important;
        border: 2px solid #006666 !important;
        min-height: 50px !important;
        font-size: 1.3rem;
        width: auto !important;
        height: auto !important;
        /* Prevent any column-like behavior */
        flex-basis: auto !important;
        flex-grow: 0 !important;
        flex-shrink: 0 !important;
    }
    
    /* CRITICAL: Ensure selected state works on small mobile */
    html body .wordament-game-container .wordament-grid-container .wordament-grid .wordament-cell.selected,
    .wordament-cell.selected {
        background: #000080 !important; /* Dark Blue when selected on small mobile */
        color: white !important;
        border-color: #0000CD !important;
        transform: scale(1.05) !important;
        box-shadow: 0 4px 16px rgba(0, 0, 128, 0.4) !important;
        z-index: 10 !important;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .current-word-display {
        height: 40px; /* Fixed height for small mobile */
    }
    
    .current-word {
        font-size: 1.3rem;
        padding: 4px 12px;
        min-width: 120px;
        height: 35px; /* Fixed height for small mobile */
    }
    
    .wordament-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .control-button {
        width: 200px;
    }
}

/* Loading and Error States */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2c5aa0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.debug-info {
    background: #e2e3e5;
    color: #383d41;
    padding: 10px;
    border: 1px solid #d6d8db;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.85rem;
    margin: 10px 0;
    white-space: pre-wrap;
}

/* Touch/Drag Visual Feedback */
.wordament-cell:active {
    transform: scale(0.95);
}

.wordament-grid:active {
    cursor: grabbing;
}

/* Improve touch targets on mobile */
@media (max-width: 768px) and (pointer: coarse) {
    /* CRITICAL: Maintain grid cell behavior with dark cyan background */
    html body .wordament-game-container .wordament-grid-container .wordament-grid .wordament-cell,
    .wordament-cell {
        /* REQUIREMENT: Dark cyan background for touch devices */
        background: #008B8B !important;
        color: white !important;
        border: 2px solid #006666 !important;
        min-height: 65px !important;
        min-width: 65px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: row !important;
    }
    
    /* CRITICAL: Ensure selected state works on touch devices */
    html body .wordament-game-container .wordament-grid-container .wordament-grid .wordament-cell.selected,
    .wordament-cell.selected {
        background: #000080 !important; /* Dark Blue when selected on touch devices */
        color: white !important;
        border-color: #0000CD !important;
        transform: scale(1.05) !important;
        box-shadow: 0 4px 16px rgba(0, 0, 128, 0.4) !important;
        z-index: 10 !important;
    }
}

/* EMERGENCY OVERRIDE: Prevent any flex-column behavior on wordament grid */
.wordament-grid {
    flex-direction: row !important;
}

.wordament-grid * {
    flex-direction: row !important;
}

/* Ensure grid items don't stack vertically */
.wordament-cell {
    grid-column: auto !important;
    grid-row: auto !important;
    align-self: auto !important;
    justify-self: auto !important;
}