﻿/* ==========================================================
   Editor Layout
   ========================================================== */

html,
body.editor-page {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    background: #f5f5f5;
}

/* ==========================================================
   Main Container
   ========================================================== */

.editor-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ==========================================================
   Header
   ========================================================== */

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.editor-title {
    font-size: 24px;
    font-weight: 600;
}

/* ==========================================================
   Toolbar
   ========================================================== */

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

    .toolbar button {
        min-width: 90px;
    }

/* ==========================================================
   Monaco
   ========================================================== */

#editor {
    width: 100%;
    min-height: 250px;
    border: 1px solid #d0d0d0;
}

/* ==========================================================
   Output Window
   ========================================================== */

#result {
    margin-top: 10px;
    border: 1px solid #d0d0d0;
    background: white;
    padding: 10px;
    min-height: 120px;
    max-height: 220px;
    overflow: auto;
    font-family: Consolas;
    white-space: pre-wrap;
}

/* ===========================================
   Floating Toolbar
=========================================== */

.floating-toolbar {
    position: fixed;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
}

    .floating-toolbar button {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        font-size: 22px;
        padding: 0;
        box-shadow: 0 4px 12px rgba(0,0,0,.35);
    }

/* Tabs*/
.output-panel {
    margin-top: 10px;
    border: 1px solid #ccc;
    background: white;
}

.output-tabs {
    display: flex;
    border-bottom: 1px solid #ccc;
}

.tab-btn {
    flex: 1;
    border: none;
    background: #f5f5f5;
    padding: 10px;
}

    .tab-btn.active {
        background: white;
        font-weight: bold;
    }

.output-content {
    height: 180px;
    overflow: auto;
    /*padding: 10px;*/
    /*white-space: pre-wrap;*/
    font-family: Consolas;
}
.compile-error {
    /*padding: 10px;*/
    border-bottom: 1px solid #ddd;
    cursor: pointer;
}

    .compile-error:hover {
        background: #f5f5f5;
    }

    .compile-error strong {
        color: #d32f2f;
    }
#mobileCursorPad {
    position: fixed;
    z-index: 9999;
    background: #222;
    padding: 4px;
    border-radius: 10px;
    cursor: move;
    touch-action: none;
}

    #mobileCursorPad button {
        width: 36px;
        height: 36px;
        margin: 2px;
        padding: 0;
        font-size: 15px;
        border-radius: 6px;
    }
/* ==========================================================
   Mobile
   ========================================================== */

@media (max-width:768px) {

    .editor-header {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar {
        width: 100%;
    }

        .toolbar button {
            flex: 1;
        }

    .editor-title {
        font-size: 20px;
        text-align: center;
    }
}
/* Show only on mobile */

@media (max-width:768px) {

    .floating-toolbar {
        display: flex;
    }
}