/* for py studio compiler */
/* PY STUDIO BUTTON */

html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

.container-fluid.h-100 {
    height: 100vh;
}


#editor {
  height: 100%;
  min-height: 250px;
}


/* Prevent select dropdown from becoming too wide */
.form-select-sm {
  min-width: 90px;
}

#output {
    width: 100%;
    height: 0;
    overflow: auto;
    padding: 0;
    background: transparent;
    transition: height 0.2s ease;

    white-space: pre-wrap;   /* ✅ preserve newlines */
    word-break: break-word;
    font-family: monospace;
}

/* ------------ */
button i {
    margin-right: 4px;
}

#settingsPanel {
    border-radius: 10px;
}

#settingsPanel select {
    border-radius: 8px;
}


/* Mobile polish */
@media (max-width: 576px) {
    #settingsPanel {
        justify-content: center;
    }
}

/* ============================= */
/* 🔥 Modern Toolbar Design */
/* ============================= */
/* ============================= */
/* 🔥 Modern Borderless Buttons */
/* ============================= */

.toolbar .btn {
    border: none !important;
    border-radius: 10px;
    font-weight: 500;
    font-size: 14px;
    padding: 6px 14px;   /* slightly bigger */
    transition: all 0.2s ease;
}

/* Dark mode default buttons */
.bg-dark .toolbar .btn-outline-light {
    background: rgba(255,255,255,0.08);
    color: #e6e6e6;
}

/* Light mode default buttons */
.bg-light .toolbar .btn-outline-dark {
    background: rgba(0,0,0,0.05);
    color: #111;
}

/* Hover effect */
.toolbar .btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

/* RUN button */
.btn-run {
    background: #22c55e !important;
    color: white !important;
}

.btn-run:hover {
    background: #16a34a !important;
}

/* CLEAR button */
.btn-clear {
    background: rgba(220,53,69,0.12);
    color: #dc3545;
}

.btn-clear:hover {
    background: #dc3545;
    color: white;
}


/* ------------- */
#outputColumn {
    transition: background 0.3s ease;
}

.bg-dark #output {
    background: #111;
    color: #e6e6e6;
}

.bg-light #output {
    background: #ffffff;
    color: #111;
}



@media (min-width: 992px) {
    #editor {
        height: 100%;
    }
}

@media (max-width: 576px) {
    .toolbar .btn {
        font-size: 12px;
        padding: 4px 8px;
    }

    .toolbar .btn i {
        font-size: 14px;
    }
}

@media (max-width: 992px) {

    .row.flex-fill {
        flex-direction: column;
    }

    #editor {
        height: 50vh;
    }

    #outputColumn {
        height: 50vh;
    }
}

.open-py-btn {
    white-space: nowrap;
}

@media (max-width: 400px) {
    .toolbar .btn i {
        font-size: 14px;
    }

    .toolbar .btn {
        padding: 4px 6px !important;
    }
}



/* Hide button text on small screens */
@media (max-width: 768px) {

    .toolbar .btn {
        padding: 6px 8px !important;
        font-size: 0; /* hide text */
    }

    .toolbar .btn i {
        font-size: 16px;
        margin: 0 !important;
    }

    .toolbar .btn::after {
        content: none;
    }

    /* Keep RUN slightly larger */
    .btn-run {
        margin-left: auto;
        order: 99;
        box-shadow: 0 4px 10px rgba(34, 197, 94, 0.4);
    }
}

/* PY STUDIO BUTTON WHICH IS AVAILABLE ON MAIN WEBSITE PAGE */
.open-py-btn {
    background: linear-gradient(135deg, #4FC3F7, #29B6F6) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 40px;
    padding: 8px 22px;
    transition: all 0.3s ease;
}

.open-py-btn:hover {
    background: linear-gradient(135deg, #29B6F6, #0288D1) !important;
    color: #ffffff !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(2, 136, 209, 0.35);
}

/* Logo bigger */
.app-logo-with-text {
    width: 25px;
    height: 25px;
}

/* Slightly smaller text */
.py-studio-text {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Mobile view */
@media (max-width: 992px) {
    .py-studio-text {
        display: none;
    }
}
