/* 

場所（環境変化に応じるため相対パス）
jpy80otayori\css\styles_depzyokyo.css

更新内容

ここに書く

ベーススタイル */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    margin: 20px auto;
    max-width: 800px; /* PC表示時の最大幅を広げ、横並びにするスペースを確保 */
    background-color: #fdfdfd;
    color: #333;
    padding: 10px;
    line-height: 1.6;
}

/* ヘッダーとナビゲーション */
header {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 1.8em;
    margin-bottom: 0.5em;
}

nav {
    font-size: 0.9em;
}

nav a {
    color: #007bff;
    text-decoration: none;
    margin: 0 0.5em;
}

nav a:hover {
    text-decoration: underline;
}

/* セクション見出し */
h2 {
    font-size: 1.4em;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

/* フォーム要素 */
label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: bold;
}

textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.5em;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    resize: vertical;
    font-family: monospace; /* タグ入力に適したフォント */
}

textarea:focus {
    outline: 2px solid #007bff; /* フォーカス色を青に統一 */
    border-color: #007bff;
}

textarea[readonly] {
    background-color: #f8f8f8;
    cursor: default;
}

/* ヘルプテキスト */
.help-text {
    font-size: 0.9em;
    color: #555;
    margin: 0.5em 0;
    line-height: 1.4;
}

.help-text code {
    background: #f0f0f0;
    padding: 0.2em 0.4em;
    border-radius: 3px;
}

/* ボタンの統一スタイル */
button,
.action-btn {
    display: inline-block;
    padding: 0.5em 1em;
    border: none;
    background-color: #007bff; /* 青で統一、視認性向上 */
    color: white;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9em;
    transition: background-color 0.2s ease, transform 0.1s ease;
    margin: 0.5em 0.5em 0 0;
}

button:hover,
.action-btn:hover {
    background-color: #0056b3;
    transform: translateY(-1px); /* 軽い浮き上がり効果 */
}

button:focus,
.action-btn:focus {
    outline: 2px solid #003087; /* フォーカスを濃い青で強調 */
    outline-offset: 2px;
}

button:disabled,
.action-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* restore-btn のスタイル（action-btn で統一） */
.restore-btn {
    /* action-btn のスタイルを継承 */
    font-size: 0.85em; /* ログ内で少し小さめ */
}

/* 結果セクション */
.result {
    margin-top: 1.5em;
    padding: 1em;
    background-color: #e6f0fa; /* 薄い青で視認性向上 */
    border: 1px solid #b3d4fc;
    border-radius: 4px;
}

/* エラーメッセージ */
.error {
    color: #d32f2f;
    font-size: 0.9em;
    margin: 0.5em 0;
    min-height: 1.5em; /* 空時のスペース確保 */
    transition: opacity 0.3s ease;
}

/* プログレスバー */
.progress-bar {
    display: none;
    width: 100%;
    height: 6px; /* 少し薄くしてモダンに */
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin: 0.5em 0;
}

.progress-bar[aria-hidden="false"] {
    display: block;
}

.progress {
    width: 0;
    height: 100%;
    background: #007bff; /* ボタンと色を統一 */
    transition: width 0.3s ease;
}

/* ログセクション */
.log-list {
    margin-top: 1em;
    max-height: 400px; /* 少し高くして表示数増加 */
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5em;
    background-color: #fafafa;
}

.log-entry {
    margin-bottom: 0.5em;
    padding: 0.5em;
    border-bottom: 1px solid #eee;
}

.log-entry:last-child {
    border-bottom: none;
}

details {
    font-size: 0.9em;
}

details summary {
    cursor: pointer;
    font-weight: bold;
    color: #007bff; /* ボタンと色を統一 */
    padding: 0.3em 0;
}

details p {
    margin: 0.5em 0;
    color: #333;
}

details p strong {
    color: #007bff; /* 入力/出力を強調 */
}

/* スクロールバーのカスタマイズ */
.log-list::-webkit-scrollbar {
    width: 6px;
}

.log-list::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.log-list::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 3px;
}

.log-list::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* フッター */
footer {
    margin-top: 2em;
    text-align: center;
    font-size: 0.9em;
    color: #666;
}

footer a {
    color: #007bff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* 横並びのラッパー */
.input-output-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 25px 0;
}

/* 各セクションの設定 */
.input-output-wrapper section {
    flex: 1;
    min-width: 300px;
    min-width: 0; /* テキストエリアの縮小問題を防ぐ */
    margin: 0;
}

/* ★追加・変更点★ ネガティブプロンプトセクションの横並び */
.negative-prompt-wrapper {
    display: flex;
    flex-wrap: wrap; /* 画面幅が狭い場合は折り返す */
    gap: 20px; /* アイテム間の隙間 */
    margin-top: 15px;
}

.negative-prompt-item {
    flex: 1; /* 利用可能なスペースを均等に分配 */
    min-width: 280px; /* アイテムの最小幅 */
    display: flex;
    flex-direction: column; /* ラベル、テキストエリア、ボタンを縦に並べる */
}

.negative-prompt-item label {
    margin-bottom: 5px; /* ラベルとテキストエリアの間に少し隙間 */
}

.negative-prompt-item textarea {
    flex-grow: 1; /* テキストエリアが残りのスペースを埋める */
    margin-bottom: 10px; /* テキストエリアとボタンの間に隙間 */
}

.negative-prompt-item .negative-copy-btn {
    align-self: flex-end; /* ボタンを右寄せにする */
    margin-top: 0; /* 上のデフォルトマージンをリセット */
}

/* レスポンシブ対応 */
@media (max-width: 800px) { /* 横並びを解除するブレークポイントを調整 */
    .negative-prompt-wrapper {
        flex-direction: column; /* 縦並びに戻す */
    }
}

@media (max-width: 600px) {
    body {
        margin: 10px;
        padding: 5px;
    }
    h1 {
        font-size: 1.5em;
    }
    h2 {
        font-size: 1.2em;
    }
    textarea {
        font-size: 0.9em;
    }
    button,
    .action-btn {
        padding: 0.4em 0.8em;
        font-size: 0.85em;
    }
    .log-list {
        max-height: 300px;
    }
    .input-output-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    .input-output-wrapper section {
        min-width: auto;
        width: 100%;
    }
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
    body {
        background-color: #fff;
        color: #000;
    }
    button,
    .action-btn {
        background-color: #003087;
    }
    .error {
        color: #b00020;
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    textarea {
        background-color: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }
    .result {
        background-color: #2a3a5a;
        border-color: #4a6a9a;
    }
    .log-list {
        background-color: #2a2a2a;
        border-color: #444;
    }
    .log-entry {
        border-bottom-color: #444;
    }
    details summary,
    details p strong {
        color: #66b0ff;
    }
    button,
    .action-btn {
        background-color: #66b0ff;
    }
    button:hover,
    .action-btn:hover {
        background-color: #3388ff;
    }
    .progress-bar {
        background: #444;
    }
    .progress {
        background: #66b0ff;
    }
    .error {
        color: #ff6666;
    }
    footer {
        color: #aaa;
    }
}