/* Markdown2ODT - メインスタイルシート */

/* 全体のリセットとベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ヘッダー */
header {
    background-color: #2c3e50;
    color: #fff;
    padding: 20px;
    text-align: center;
}

header h1 {
    margin-bottom: 10px;
}

/* メインコンテンツ */
main {
    padding: 20px;
}

/* タブ */
.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tab-button {
    padding: 10px 20px;
    background-color: #f1f1f1;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.tab-button:hover {
    background-color: #ddd;
}

.tab-button.active {
    background-color: #fff;
    border-bottom: 2px solid #2c3e50;
}

.tab-content {
    display: block;
}

.tab-content.hidden {
    display: none;
}

/* エディタコンテナ */
.editor-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.editor-column, .preview-column {
    flex: 1;
}

.editor-column h2, .preview-column h2 {
    margin-bottom: 10px;
    color: #2c3e50;
}

/* EasyMDEエディタのカスタマイズ */
.CodeMirror, .CodeMirror-scroll {
    min-height: 400px;
}

/* プレビューコンテナ */
#preview-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    min-height: 400px;
    overflow-y: auto;
    background-color: #fff;
}

/* プレビュー内のマークダウンスタイル */
#preview-container h1, #preview-container h2, #preview-container h3,
#preview-container h4, #preview-container h5, #preview-container h6 {
    margin-top: 1em;
    margin-bottom: 0.5em;
    color: #2c3e50;
}

#preview-container p {
    margin-bottom: 1em;
}

#preview-container ul, #preview-container ol {
    margin-left: 2em;
    margin-bottom: 1em;
}

#preview-container blockquote {
    border-left: 4px solid #ddd;
    padding-left: 1em;
    color: #666;
    margin-bottom: 1em;
}

#preview-container code {
    background-color: #f5f5f5;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
}

#preview-container pre {
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 3px;
    overflow-x: auto;
    margin-bottom: 1em;
}

#preview-container table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1em;
}

#preview-container th, #preview-container td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

#preview-container th {
    background-color: #f5f5f5;
}

/* ファイルアップロード */
.upload-container {
    margin-bottom: 20px;
}

.file-upload {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload label {
    background-color: #2c3e50;
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
    transition: background-color 0.3s;
}

.file-upload label:hover {
    background-color: #1a252f;
}

#file-name {
    color: #666;
}

.file-info {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

/* ボタン */
.button-container {
    text-align: center;
    margin-top: 20px;
}

.convert-button {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.convert-button:hover {
    background-color: #219653;
}

/* エラーメッセージ */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

/* フッター */
footer {
    background-color: #f1f1f1;
    padding: 15px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .editor-container {
        flex-direction: column;
    }
    
    .editor-column, .preview-column {
        width: 100%;
    }
    
    .CodeMirror, .CodeMirror-scroll, #preview-container {
        min-height: 300px;
    }
}
