/* ==========================================
   ChessAPit - Mobile Responsive Styles
   קובץ: mystyle-mobile.css
   תיאור: התאמות למסכים קטנים ומובייל
   ========================================== */

/* === Media Queries === */
@media (max-width: 900px) {
    #explanationBox {
        padding: 7px 6px 2px 6px;
        min-height: 24px;
    }
    
    #explanationBox .puzzle-title {
        font-size: 18px;
    }
    
    #explanationBox .puzzle-author {
        font-size: 16px;
    }
    
    #output {
        font-size: 4vw;
        padding: 8px;
        line-height: 1.9;
        min-height: 10vh;
    }
    
    .tree-indent-1 {
        margin-left: 1.2em;
    }
    
    .tree-indent-2 {
        margin-left: 2em;
    }
    
    .tree-indent-3 {
        margin-left: 2.7em;
    }
    
    #moveHistory {
        font-size: 3.4vw;
        width: 50px;
        height: 24px;
        padding: 6px;
    }
    
    #fenInput {
        font-size: 3.2vw;
    }
    
    #loadButton {
        font-size: 3vw;
    }
    
    #myBoard {
        min-height: 300px;
    }
}

/* ==========================================
   הגנה על מצב Portrait במובייל
   ========================================== */

/* ודא שבמובייל portrait הפריסה נשארת כמו שהיה - רק אם לא floating */
@media (orientation: portrait) {
    /* ביטול כל שינויי landscape במובייל portrait - רק אם לא במצב לוח צף */
    #chessContainer.layout-landscape:not(.floating-mode) {
        display: block !important;
        flex-direction: column !important;
    }

    /* aftbrd חוזר למצב רגיל */
    #chessContainer.layout-landscape:not(.floating-mode) #aftbrd {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        left: auto !important;
        top: auto !important;
        border-radius: 0 0 12px 12px !important;
    }

    /* gameInfo חוזר לפריסה אנכית */
    #chessContainer.layout-landscape:not(.floating-mode) #gameInfo {
        flex-direction: column !important;
        gap: 10px !important;
    }

    /* boardWrapper - פינות כרגיל */
    #chessContainer.layout-landscape:not(.floating-mode) #boardWrapper {
        border-radius: 0 !important;
    }

    /* container - רוחב רגיל */
    #chessContainer.layout-landscape:not(.floating-mode) {
        width: auto !important;
    }

    /* toexplor - עיגול פינות כרגיל */
    #chessContainer.layout-landscape:not(.floating-mode) #toexplor {
        border-radius: 0 !important;
    }

    /* gameInfo - עיגול פינות כרגיל */
    #chessContainer.layout-landscape:not(.floating-mode) #gameInfo {
        border-radius: 0 0 12px 12px !important;
    }
}