/* static/css/custom.css */

/* Base page */
html, body {
    font-size: 90%;
    height: 100%;
    margin: 0;
}

/* CodeMirror textarea fallback */
#xml_editor {
    display: block;
    visibility: visible;
}

/* Result panel */
#result {
    white-space: pre-wrap;
    width: 100%;
    overflow-y: visible;
    padding: 10px;
    box-sizing: border-box;
    font-size: 0.90rem;
}

div#valid {
    border: 2px solid lightgreen;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    padding-top: 8px;
    padding-bottom: 8px;
    padding-left: 8px;
    background-color: lightgreen;
}

div#error-label {
    border: 2px solid red;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    padding-top: 8px;
    padding-bottom: 8px;
    padding-left: 8px;
    color: white;
    background-color: red;
}

div#error {
    margin-bottom: 10px;
    margin-left: 20px;
    padding-top: 5px;
    padding-bottom: 5px;
    padding-left: 10px;
    padding-right:10px;
    border: 2px black;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Drag & drop */
#drop-zone {
    margin-bottom: 10px;
    padding: 10px;
    border: 2px dashed #aaa;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    color: #555;
}

#drop-zone.dragover {
    border-color: #007bff;
    background: #f0f8ff;
    color: #007bff;
}

#file-picker-trigger {
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
}

#file-info {
    margin-top: 8px;
    font-size: 0.9em;
    color: #333;
}

/* Page wrapper */
.page-wrapper {
    margin: 1%;
    display: flex;
    flex-direction: column;
    height: 100vh; /* full viewport height */
}

/* Navbar */
.navbar-brand {
    font-size: 1.8rem;
    font-weight: bold;
}

/* Let the row fill the viewport height minus navbar */
.container-fluid > .row {
    height: calc(100vh - 60px); 
}

/* Make left and right side fill equally */
.col-md-6 {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 0;
}

/* Editor container should take all remaining space */
#editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; 
}

/* CodeMirror editor */
.CodeMirror {
    flex: 1;
    width: 100%;
    font-size: 0.7rem;
    box-sizing: border-box;
    border: 1px solid #ced4da;
    border-radius: 4px;
    min-height: 0;
}

/* Scroll area inside CodeMirror */
.CodeMirror-scroll {
    flex: 1; 
    overflow-y: auto;
    min-height: 0;
}

.CodeMirror-linenumber {
    color: #555 !important;
}

/* Highlight errors */
.line-error {
    background-color: rgba(255, 0, 0, 0.2);
    color: inherit;
}
