/* =================================
   Global Resets & Fonts
   ================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f7f9fa;
    color: #333;
    padding: 0;
    margin: 0;
    /* Space for the fixed footer */
    padding-bottom: 80px;
}

h1,
h2,
h3 {
    color: #1a1a1a;
    font-weight: 600;
}

/* =================================
   Main Layout
   ================================= */
.main-container {
    display: flex;
    gap: 30px;
    max-width: 1800px;
    margin: 0 auto;
    height: calc(100vh - 80px); /* 80px is for footer */
    padding: 20px;
}

.control-panel {
    flex: 2;
    min-width: 450px;
    display: flex;
    flex-direction: column;
}

.output-panel {
    flex: 3;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

/* =================================
   Content Sections
   ================================= */
.input-section .dhx_form-group {
    margin-bottom: 15px;
}

.preview-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.preview-section h2 {
    margin-top: 0;
    flex-shrink: 0;
}

#form-preview-container {
    flex-grow: 1;
    overflow-y: auto;
}

/* =================================
   Monaco Editor Block
   ================================= */
.json-preview-section {
    padding: 20px 0 0 0;
    position: relative;
}

.json-preview-section h2 {
    padding: 0 20px;
    margin-bottom: 15px;
}

.json-preview-container {
    position: relative;
    height: 100%;
    width: 100%;
    flex-grow: 1;
}

#json-editor-container {
    width: 100%;
    height: 100%;
}

/* =================================
   Buttons
   ================================= */
.editor-btn-container {
    position: absolute;
    top: -40px;
    right: 20px;
    z-index: 10;
    display: flex;
    gap: 10px;
}

.editor-btn {
    padding: 5px 12px;
    font-size: 12px;
    background-color: #555;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.editor-btn:hover {
    background-color: #0288d1;
}

#copy-btn {
    background-color: #0288d1;
    width: 100px;
}

#copy-btn:hover {
    background-color: #0277bd;
}

/* =================================
   Prompt Suggestions
   ================================= */
.suggestions-container {
    margin: 20px 0;
}

.suggestions-container h3 {
    font-size: 14px;
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: 500;
    color: #555;
}

.suggestions-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.prompt-pill {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    background-color: #e9f3f8;
    color: #0277bd;
    border: 1px solid #d1e6f0;
    border-radius: 16px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    text-align: left;
}

.prompt-pill:hover {
    background-color: #d1e6f0;
    transform: translateY(-1px);
}

/* =================================
   Loader & Errors
   ================================= */
.loader {
    text-align: center;
    font-style: italic;
    color: #555;
    margin-top: 15px;
}

#error-message {
    color: #d32f2f;
    margin-top: 15px;
    font-weight: 500;
}

/* =================================
   Footer Styles
   ================================= */
.dhx_demo-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #2d333f;
    padding-left: 8px;
    padding-right: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
    max-height: 60px;
    z-index: 1000;
    font-family: Roboto, sans-serif;
}

.dhx_demo-footer .dhx_layout-cell-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    width: 100%;
}

.dhx_demo-footer .dhx_slider-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    border-radius: 50%;
    border: 2px solid #fff;
    height: 36px;
    width: 36px;
    min-width: 36px;
    text-decoration: none;
    transition: border-color 0.3s, fill 0.3s;
}

.dhx_demo-footer .dhx_slider-btn:hover {
    border-color: #03a9f4;
}

.dhx_demo-footer .dhx_slider-btn:hover path {
    fill: #03a9f4;
}

.dhx_demo-footer .dhx_slider-btn path {
    transition: fill 0.3s;
}

.dhx_demo-footer .dhx_slider-btn--prev {
    transform: rotate(180deg);
    margin-right: 12px;
}

.dhx_demo-footer-text {
    flex: 1 1 auto;
    padding: 0 20px;
    text-align: center;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.8);
} 

.dhx_demo-footer-text h1,
.dhx_demo-footer-text p {
    display: inline;
    margin: 0;
    padding: 0;
    color: inherit;
}

.dhx_demo-footer-text h1 {
    font-size: inherit;
    font-weight: inherit;
}

.dhx_demo-footer-text a {
    color: #03a9f4;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
    padding-left: 4px;
}

.dhx_demo-footer-text a:hover {
    text-decoration: underline;
}

.dhx_demo-footer .dhx_sample-btn {
    flex-shrink: 0;
    border: none;
    outline: none;
    padding: 6px 28px;
    font-family: Roboto, Arial, Tahoma, Verdana, sans-serif;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    display: flex;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.dhx_demo-footer .dhx_sample-btn--cta {
    background: #0288d1;
    color: #fff;
    border-radius: 32px;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out;
}

.dhx_demo-footer .dhx_sample-btn--cta:hover {
    background: #027abc;
}

/* =================================
   Debug Test Suite
   ================================= */
.debug-report-container {
    padding: 20px;
    background-color: #f0f2f5;
}

.test-case {
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    margin-bottom: 25px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
}

.test-case.pass {
    border-left: 5px solid #52c41a; /* Green for pass */
}

.test-case.fail {
    border-left: 5px solid #f5222d; /* Red for fail */
}

.test-case h3 {
    margin-top: 0;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.test-case .prompt-display {
    background: #fafafa;
    border: 1px solid #e8e8e8;
    padding: 10px;
    border-radius: 4px;
    white-space: pre-wrap;
    font-family: monospace;
    margin-bottom: 20px;
}

.comparison-container {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.comparison-container > div {
    flex: 1;
    min-width: 0;
}

.comparison-pane {
    height: 350px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    overflow: hidden;
}