/* 基本レイアウト */
.prompt-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 90vw;
    margin: 0 auto;
    gap: 20px;
    box-sizing: border-box;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.content-container {
    display: flex;
    flex-grow: 1;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* サイドバーとメインエリア */
.prompt-sidebar {
    width: 45%;
    padding: 20px;
    background-color: #f8fafc;
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: none;
    overflow: visible;
    border-right: 1px solid #e2e8f0;
}

.prompt-main {
    width: 55%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
}

/* 入力フィールド共通スタイル */
.custom-input, .concat-input, .dlText {
    font-size: 15px;
    background-color: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    transition: all 0.2s ease;
    width: 100%;
}

.custom-input:focus, .concat-input:focus, .dlText:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* ラベルとテキストスタイル */
.field-description {
    font-size: 12px !important;
    color: #64748b;
    margin: 0.3em 0;
    display: block;
}

div.dl-container p, .option-label {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

/* ボタンスタイル */
.button-container {
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

.copy-button,
.reset-button {
    flex: 1;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-button {
    background-color: #3b82f6;
    color: white;
}

.copy-button:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.reset-button {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.reset-button:hover {
    background-color: #e2e8f0;
}

/* 要件ラベル */
.requirement-label {
    margin-left: 10px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
}

.requirement-label.任意 { background-color: #10b981; }
.requirement-label.推奨 { background-color: #3b82f6; }
.requirement-label.必須 { background-color: #ef4444; }
.requirement-label.任意,
.requirement-label.推奨,
.requirement-label.必須 { color: #fff; }

/* 区切り線 */
.custom-divider {
    border: none;
    height: 1px;
    background: #e2e8f0;
    margin: 10px 0 !important;
}

/* コードコンテンツ */
#codeBeforeContent, #codeAfterContent,
#initial-prompt, #final-prompt {
    color: #808080;
    margin-bottom: 10px;
}

#codeBeforeContent, #initial-prompt { font-size: 14px; }
#codeAfterContent, #final-prompt { font-size: 12px; }

/* 出力ボックス */
.output-box-prompt {
    flex: 1;
    font-size: 15px;
    width: 100%;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    white-space: pre-wrap;
    box-sizing: border-box;
    height: auto;
    background: #fff;
}

/* チェックボックスとラジオボタンの選択肢コンテナ */
.checkbox-group, .radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

/* 選択肢のラベルスタイル */
.checkbox-group label, .radio-group label {
    display: block;
    position: relative;
    background-color: #f8fafc;
    margin: 0;
    padding: 12px 12px 12px 45px;
    border-radius: 8px;
    min-height: 24px;
    line-height: 1.5;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 14px;
    color: #1e293b;
    white-space: normal;
    word-break: break-word;
}

/* カスタム入力要素のベーススタイル */
.custom-input input[type="checkbox"],
.custom-input input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* チェックボックスとラジオボタンのコンテナ */
.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 選択肢の基本スタイル */
.checkbox-group label,
.radio-group label {
    display: block;
    position: relative;
    margin: 0;
    padding: 12px 12px 12px 45px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #1e293b;
    line-height: 1.5;
    width: auto;
    box-sizing: content-box;
}

/* チェックマークとラジオのマーカー基本スタイル */
.checkbox-group label:before,
.radio-group label:before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-color: #fff;
    border: 2px solid #e2e8f0;
    box-sizing: border-box;
}

/* 特有のスタイル */
.radio-group label:before {
    border-radius: 50%;
}

.checkbox-group label:before {
    border-radius: 6px;
}

/* チェック・選択時のスタイル */
.checkbox-group input:checked + label,
.radio-group input:checked + label {
    background-color: #ebf5ff;
    border-color: #3b82f6;
}

.checkbox-group input:checked + label:before,
.radio-group input:checked + label:before {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

/* チェックマーク */
.checkbox-group input:checked + label:after {
    content: '';
    position: absolute;
    left: 19px;
    top: 50%;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translateY(-65%) rotate(45deg);
}

/* ラジオボタンの選択マーク */
.radio-group input:checked + label:after {
    content: '';
    position: absolute;
    left: 17px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: white;
}

/* ホバー状態 */
.checkbox-group label:hover,
.radio-group label:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
}

/* HTML有効なテキストエリアのスタイル */
.custom-input.html-enabled {
  font-family: monospace;
  background-color: #f5f7f9;
  color: #333;
  border: 1px solid #ccc;
}

/* コードブロック用のスタイル */
#outputBox pre {
  background-color: #f8f8f8;
  border: 1px solid #e1e4e8;
  border-radius: 3px;
  font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
  font-size: 85%;
  line-height: 1.45;
  overflow: auto;
  padding: 10px;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 8px 0;
  tab-size: 4;
}

/* WPタグに色付け */
#outputBox pre .wp-tag {
  color: #005cc5;
}

/* HTML構文カラーリング */
#outputBox pre .tag {
  color: #22863a;
}

#outputBox pre .attribute {
  color: #6f42c1;
}

#outputBox pre .value {
  color: #032f62;
}

/* テキストエリア用スタイル */
textarea.custom-input {
  font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
  font-size: 0.9em;
  tab-size: 4;
}

/* common-style.css に追加する改行処理CSS */

/* 出力ボックスの改行処理を強化 */
.output-box-prompt {
    white-space: pre-line !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 出力ボックス内の要素も改行を保持 */
.output-box-prompt div,
.output-box-prompt pre,
.output-box-prompt span {
    white-space: pre-line !important;
}

/* codeBeforeContent と codeAfterContent の改行処理 */
#codeBeforeContent,
#codeAfterContent {
    white-space: pre-line !important;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* オプション表示での改行処理 */
.custom-input {
    white-space: pre-line;
}

/* フィールド説明文の改行処理 */
.field-description {
    white-space: pre-line !important;
    line-height: 1.5;
}

/* チェックボックスとラジオボタンの選択肢内の改行 */
.checkbox-group label,
.radio-group label {
    white-space: pre-line;
    line-height: 1.4;
}