/* /var/www/html/gnzmd/css/style.css */

body, html {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    height: 100%;
    transition: background-color 0.3s, color 0.3s;
}

.editor-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #fff;
    border-bottom: 1px solid #ddd;
}

#doc-title {
    font-size: 1.2em;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    flex-grow: 1;
    margin-right: 10px;
}

.button-group button, .button-group select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 5px;
}

.button-group button:hover, .button-group select:hover {
    background-color: #e0e0e0;
}

.editor-main {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
}

.editor-panel {
    width: 50%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #ddd;
}

.toolbar {
    padding: 8px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #ddd;
}

.toolbar button {
    margin-right: 5px;
    padding: 5px 10px;
    border: 1px solid #ccc;
    background-color: #fff;
    cursor: pointer;
    font-size: 14px;
}

.toolbar button:hover {
    background-color: #f0f0f0;
}

#markdown-input {
    flex-grow: 1;
    border: none;
    padding: 20px;
    font-family: monospace;
    font-size: 16px;
    line-height: 1.6;
    resize: none;
    outline: none;
    background-color: #fff;
    color: #333;
}

#html-preview {
    width: 50%;
    box-sizing: border-box;
    padding: 20px;
    overflow-y: auto;
    background-color: #fff;
}

/* Dark Theme */
body.dark-theme {
    background-color: #333;
    color: #f1f1f1;
}

body.dark-theme .editor-header {
    background-color: #444;
    border-bottom: 1px solid #555;
}

body.dark-theme #doc-title {
    background-color: #555;
    border-color: #666;
    color: #f1f1f1;
}

body.dark-theme .button-group button, body.dark-theme .button-group select {
    background-color: #555;
    border-color: #666;
    color: #f1f1f1;
}

body.dark-theme .button-group button:hover, body.dark-theme .button-group select:hover {
    background-color: #666;
}

body.dark-theme .editor-panel {
    border-right: 1px solid #555;
}

body.dark-theme .toolbar {
    background-color: #444;
    border-bottom: 1px solid #555;
}

body.dark-theme .toolbar button {
    background-color: #555;
    border-color: #666;
    color: #f1f1f1;
}

body.dark-theme .toolbar button:hover {
    background-color: #666;
}

body.dark-theme #markdown-input {
    background-color: #2a2a2a;
    color: #f1f1f1;
}

body.dark-theme #html-preview {
    background-color: #2a2a2a;
}

body.dark-theme #html-preview h1, body.dark-theme #html-preview h2, body.dark-theme #html-preview h3 {
    border-bottom-color: #555;
}

body.dark-theme #html-preview code {
    background-color: #444;
}

body.dark-theme #html-preview pre {
    background-color: #444;
}

/* Modal styles */
.modal-content {
    background-color: #fefefe;
}

body.dark-theme .modal-content {
    background-color: #444;
}

.modal {
    display: none; 
    position: fixed; 
    z-index: 1; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; 
    background-color: rgba(0,0,0,0.4);
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

body.dark-theme .close-btn {
    color: #ccc;
}

body.dark-theme .close-btn:hover,
body.dark-theme .close-btn:focus {
    color: #fff;
}
