/* -----------------------------------------------------------
   Markdown to HTML Converter Pro - Full Modern Design System
   Primary Color: #46757E
----------------------------------------------------------- */

/* 全体コンテナ - カード型デザインと最大幅の拡張 */
.mthc-wrapper {
    max-width: 1400px; /* 横幅を広げて作業領域を確保 */
    margin: 40px auto;
    padding: 32px;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
    line-height: 1.6;
    box-sizing: border-box;
}

/* タイトル - 左ボーダーによるアクセント */
.mthc-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 24px 0;
    letter-spacing: -0.025em;
    border-left: 5px solid #46757E;
    padding-left: 15px;
}

/* ツールバー & オプション設定エリア */
.mthc-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 16px;
    background-color: #f8fafc;
    border-radius: 12px;
}

.mthc-option {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* スニペットボタンエリア - チップ状のUI */
.mthc-snippet-area {
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.mthc-small-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mthc-snippet-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 99px;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mthc-snippet-btn:hover {
    border-color: #46757E;
    color: #46757E;
    background-color: #f0f9fa;
    transform: translateY(-1px);
}

/* エディタ領域 - 2カラムレイアウト */
.mthc-editor-area {
    display: flex;
    gap: 32px; /* カラム間の余白を十分に確保 */
    margin-bottom: 24px;
    width: 100%;
}

.mthc-editor-left,
.mthc-editor-right {
    flex: 1;
    min-width: 0; /* フレックスアイテムのはみ出し防止 */
    display: flex;
    flex-direction: column;
}

.mthc-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    color: #334155;
}

/* テキストエリア本体 - サイズとフォントの最適化 */
.mthc-textarea {
    width: 100%;
    height: 550px; /* 作業性を高めるための高さ設定 */
    min-height: 300px;
    padding: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: 'Fira Code', 'Cascadia Code', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.95rem;
    line-height: 1.7;
    background-color: #ffffff;
    color: #1e293b;
    transition: border-color 0.2s, box-shadow 0.2s;
    resize: vertical;
    box-sizing: border-box;
}

.mthc-textarea:focus {
    outline: none;
    border-color: #46757E;
    box-shadow: 0 0 0 4px rgba(70, 117, 126, 0.1);
}

/* HTML出力側（読み取り専用）のスタイル調整 */
.mthc-textarea[readonly] {
    background-color: #f8fafc;
    color: #64748b;
    cursor: default;
}

/* メインボタン群 */
.mthc-button-group {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.mthc-btn {
    flex: 1;
    padding: 14px 24px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    background-color: #46757E;
    color: #ffffff;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(70, 117, 126, 0.2);
    text-align: center;
}

.mthc-btn:hover {
    background-color: #385d65;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(70, 117, 126, 0.3);
}

.mthc-btn:active {
    transform: translateY(0);
}

/* サブボタン（インポートボタン等） */
.mthc-btn-secondary {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    background: #ffffff;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.mthc-btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* プレビューエリア - 清潔感のある表示領域 */
.mthc-preview-wrapper {
    border-top: 2px solid #f1f5f9;
    padding-top: 32px;
}

.mthc-preview-title {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mthc-preview-area {
    min-height: 200px;
    padding: 32px;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.02);
    overflow-x: auto;
}

/* レスポンシブ対応 - 画面幅に応じたレイアウトの切り替え */
@media screen and (max-width: 1024px) {
    .mthc-wrapper {
        max-width: 95%;
        padding: 24px;
        margin: 20px auto;
    }
}

@media screen and (max-width: 850px) {
    .mthc-editor-area {
        flex-direction: column; /* 縦並びに切り替え */
    }
    .mthc-textarea {
        height: 350px; /* スマホでは高さを抑える */
    }
    .mthc-button-group {
        flex-direction: column; /* ボタンも縦並びに */
    }
    .mthc-title {
        font-size: 1.5rem;
    }
}