/* ==========================================
   ChessAPit - Solution Tree Styles
   קובץ: mystyle-tree.css
   תיאור: עיצוב עץ הפתרון והתוכן
   ========================================== */

/* === עץ הפתרון === */
#toexplor {
    width: 80%;
    max-width: 80%;
    flex-grow: 1;
    padding: 1px;
    text-align: left;
    background: #cbcafe00; /* שקוף לבדיקה */
}

#output {
    margin: 1px;
    background: #e7f6ff;
    padding: 5px;
    padding-top: 20px;
    border-bottom-left-radius: 7px;
    overflow-x: auto;
    min-height: 10vh;
    height: auto;
    max-width: 100%;
    white-space: pre-wrap;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    line-height: 2.2;
    font-size: 18px;
    box-sizing: border-box;
    color: #2c3e50;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* רקע אפור כשעוברים את מגבלת המהלכים */
#output.exceeded-moves {
    background-color: #e0e0e0;
    opacity: 0.8;
    transition: all 0.3s ease;
}

/* שורות בעץ הפתרון - עיצוב נקי ומודרני */
.puzzle-line,
.tree-indent-1,
.tree-indent-2,
.tree-indent-3 {
    background: transparent;
    padding: 1px 4px;
    margin-bottom: 1px;
    border-radius: 0;
    border: none;
    border-left: 2px solid transparent;
    transition: all 0.5s ease;
    position: relative;
}

.puzzle-line:hover,
.tree-indent-1:hover,
.tree-indent-2:hover,
.tree-indent-3:hover {
    background: rgba(202, 253, 254, 0.2);
    border-left-color: var(--board-dark);
}

/* === סגנונות עץ הפתרון === */
.puzzle-line {
    margin-bottom: 2px;
    position: relative;
    font-weight: 600;
}

.tree-indent-1 {
    margin-left: 2em;
    margin-bottom: 2px;
    opacity: 0.9;
}

.tree-indent-2 {
    margin-left: 4em;
    margin-bottom: 2px;
    opacity: 0.85;
}

.tree-indent-3 {
    margin-left: 6em;
    margin-bottom: 2px;
    opacity: 0.8;
}

/* === ספינר טעינה === */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 24px auto 12px auto;
    display: block;
}



/**
 * tree-slots.css
 * עיצוב למערכת ה-slots החדשה
 */

/* === Slots System === */
.move-slot {
    line-height: 1.4;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 18px;
    color: #2c3e50;
    padding: 1px 4px;
    margin-bottom: 2px;
    border-left: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    min-height: 0.5em;
}

/* כשה-slot ריק, גובה מינימלי */
.move-slot:not(.revealed) {
    line-height: 0.3;
    opacity: 0.8;
}

/* כשה-slot מתמלא */
.move-slot.revealed {
    line-height: 1.4;
    opacity: 1;
}

/* הזחות */
.move-slot.indent-1 {
    margin-left: 2em;
}

.move-slot.indent-2 {
    margin-left: 4em;
}

/* hover effects */
.move-slot:hover {
    background: rgba(202, 253, 254, 0.2);
    border-left-color: var(--board-dark, #769656);
}

/* כותרות */
.section-title {
    margin-top: 0.7em;
    margin-bottom: 0.5em;
    font-weight: 400;
    font-size: 14px;
    color: #0f172a;
}

/* הסתרה */
.hidden {
    display: none !important;
}

/* === אנימציית fade-in לתוכן חדש === */
@keyframes fadeInContent {
    from {
        opacity: 0;
        color: transparent;
    }
    to {
        opacity: 1;
        color: inherit;
    }
}

/* החל fade-in על תוכן שנחשף */
.move-slot.revealed .content.new-content {
    animation: fadeInContent 0.7s ease-out;
}

/* גם על chess pieces בתוך התוכן החדש */
.move-slot.revealed .content.new-content .chess-piece {
    animation: fadeInContent 0.7s ease-out;
}

/* סגנונות למהלכים מיוחדים */
.move-slot[data-type="main-move"] .content,
.move-slot[data-type="main-with-threat"] .content {
    font-weight: 500;
    color: #228B22;
}

.move-slot[data-type="defense"] .content,
.move-slot[data-type="quiet-defense"] .content {
    color: #1A661A;
    font-weight: 500;
    /* background-color: #cafdfe; */
}

.move-slot[data-type="almost-move"] .content {
    /* font-style: italic; */
    color: #CC5500;
    font-weight: 500;
}

.move-slot[data-type="blocked-attempt"] .content {
    color: #990000;
    font-weight: 500;
}

/* כלי שחמט */
.chess-piece {
    font-size: 1.1em;
    vertical-align: middle;
}

/* === סגנונות לרצפי מהלכים (sequences) === */

/* טקסט מבוא לרצף - פשוט כמו טקסט רגיל */
.move-slot[data-type="sequence-intro"] {
    line-height: 1.4;
    margin-bottom: 2px;
}

/* צעדי רצף - לא revealed */
.move-slot[data-type="sequence-step"]:not(.revealed) {
    line-height: 0.3;
    opacity: 0.8;
    min-height: 0.5em;
}

/* צעדי רצף - revealed */
.move-slot[data-type="sequence-step"].revealed {
    line-height: 1.4;
    opacity: 1;
}

.move-slot[data-type="sequence-step"] .content {
    color: #003366;  /* כחול כהה מאוד */
    font-weight: 500;
}

.move-slot[data-type="sequence-step"]:hover {
    background: rgba(202, 253, 254, 0.3);
}

/* התאמה למובייל */
@media (max-width: 768px) {
    .move-slot {
        font-size: 16px;
    }

    .move-slot.indent-1 {
        margin-left: 1.5em;
    }

    .move-slot.indent-2 {
        margin-left: 3em;
    }

    .sequence-intro-text {
        font-size: 14px;
        padding: 6px 10px;
    }
}