/* 
 * Two-Way HTML Editor / Word to HTML Styles
 * QuotedEncoder (2026)
 */

/* Main Layout */
.editor-container {
    display: flex;
    height: calc(100vh - 120px); /* Adjust for header/footer */
    overflow: hidden;
    background: #f8fafc;
}

.pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.code-pane {
    background: #0f172a; /* Slate 900 */
    border-right: 1px solid #334155;
    position: relative;
}

.design-pane {
    background: #fff;
    position: relative;
    overflow: hidden;
}

/* Toolbar Styling */
.top-toolbar {
    background: #1e293b;
    border-bottom: 1px solid #334155;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    z-index: 10;
}

.tool-group {
    display: flex;
    gap: 6px;
    align-items: center;
}

.tool-btn {
    background: #334155;
    border: 1px solid #475569;
    color: #e2e8f0;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tool-btn:hover {
    background: #475569;
    color: #fff;
    transform: translateY(-1px);
}

.tool-input {
    background: #0f172a;
    border: 1.5px solid #334155;
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
}

.tool-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 210, 0.15);
}

/* Code Area (IDE Feel) */
#codeArea {
    width: 100%;
    height: 100%;
    padding: 25px;
    border: none;
    background: transparent;
    color: #e2e8f0;
    font-family: 'Fira Code', 'Fira Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: none;
    outline: none;
    box-sizing: border-box;
}

/* Design Area (True Preview) */
#designArea {
    width: 100%;
    height: 100%;
    padding: 40px;
    outline: none;
    color: #1e293b;
    font-family: 'Inter', sans-serif;
    overflow-y: auto;
    box-sizing: border-box;
    background: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.02);
}

/* Mobile Preview Mode Override */
#designArea.mobile-view {
    width: 375px;
    height: 667px;
    margin: 40px auto;
    border: 12px solid #0f172a;
    border-radius: 36px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.2);
    padding: 20px;
    background: #fff;
}

/* Light Mode Overrides */
body.light-mode .code-pane { background: #fdfdfd; border-right-color: #e2e8f0; }
body.light-mode .top-toolbar { background: #fff; border-bottom-color: #e2e8f0; }
body.light-mode .tool-btn { background: #f1f5f9; border-color: #e2e8f0; color: #475569; }
body.light-mode .tool-btn:hover { background: #e2e8f0; color: #1e293b; }
body.light-mode .tool-input { background: #f8fafc; border-color: #e2e8f0; color: #1e293b; }
body.light-mode #codeArea { color: #1e293b; }

/* Responsive adjustments */
@media (max-width: 900px) {
    .editor-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    .pane {
        height: 500px;
    }
    .code-pane {
        border-right: none;
        border-bottom: 1px solid #334155;
    }
}
