/* 既存のCSSを適用しつつWikiの調整を行う */
@import url("common.css");
/* 既存のoqzl.net用CSSを読み込む */

/* ===== Wikiコンテンツ用の調整 ===== */
#content-wrapper {
	max-width: 1000px;
	margin: 0 auto;
	padding: 20px;
}

/* ===== Wiki専用リセット ===== */
.wiki-content * {
	all: unset;
	/* すべての要素のデフォルトスタイルを解除 */
	display: revert;
	/* ブラウザのデフォルトに戻す */
	font-family: "UD Shin Go Regular", "Helvetica Neue", Arial, sans-serif;
	box-sizing: border-box;
}

/* ===== Wiki コンテンツ全体のスタイル ===== */
.wiki-content {
	font-size: 1.1em;
	line-height: 1.8;
	color: #222;
	background-color: #ffffff;
	padding: 20px;
	word-wrap: break-word;
}

/* ===== 見出し ===== */
.wiki-content h1,
.wiki-content h2,
.wiki-content h3 {
	font-weight: bold;
	/* border-bottom: 2px solid #ccc; */
	padding-bottom: 5px;
	margin-bottom: 15px;
}

.wiki-content h1 {
	font-size: 1.8em;
	color: #222;
}

.wiki-content h2 {
	font-size: 1.6em;
	color: #444;
}

.wiki-content h3 {
	font-size: 1.4em;
	color: #666;
}

/* ===== 段落とリスト ===== */
.wiki-content p {
	margin-bottom: 1em;
}

.wiki-content ul,
.wiki-content ol {
	padding-left: 20px;
	margin-bottom: 1em;
}

.wiki-content ul li {
	list-style-type: disc;
}

.wiki-content ol li {
	list-style-type: decimal;
}

/* ===== 引用 ===== */
.wiki-content blockquote {
	margin: 20px 0;
	padding: 10px 20px;
	background: #f7f7f7;
	border-left: 4px solid #2980b9;
	color: #555;
	font-style: italic;
}

/* ===== コードブロック ===== */
.wiki-content pre {
	background: #272822;
	color: #f8f8f2;
	padding: 10px;
	border-radius: 5px;
	overflow-x: auto;
	font-size: 0.9em;
}

.wiki-content code {
	font-family: "Courier New", Courier, monospace;
	background: #f4f4f4;
	padding: 2px 4px;
	border-radius: 3px;
}

/* ===== テーブル ===== */
.wiki-content table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 20px;
}

.wiki-content th,
.wiki-content td {
	border: 1px solid #ddd;
	padding: 10px;
	text-align: left;
}

.wiki-content th {
	background-color: #f8f8f8;
	font-weight: bold;
}

/* ===== 画像 ===== */
.wiki-content img {
	max-width: 100%;
	height: auto;
	border-radius: 5px;
}

/* ===== リンク ===== */
.wiki-content a {
	color: #2980b9;
	text-decoration: none;
}

.wiki-content a:hover {
	text-decoration: underline;
}

/* ===== 編集フォームのスタイル ===== */
.edit-form {
	margin-top: 20px;
	background: #f8f8f8;
	padding: 20px;
	border-radius: 5px;
}

.edit-form textarea {
	width: 100%;
	height: calc(100% - 50px);
	padding: 10px;
	font-size: 1em;
	border: 1px solid #ccc;
	border-radius: 4px;
	box-sizing: border-box;
}

.edit-form button {
	padding: 10px 15px;
	font-size: 1em;
	color: white;
	background-color: #007bff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
}

.edit-form button:hover {
	background-color: #0056b3;
}

/* ===== ナビゲーションのスタイル調整 ===== */
.nav a {
	margin-left: 15px;
	text-decoration: none;
	color: #333;
	font-weight: bold;
}

.nav a:hover {
	color: #2980b9;
}

/* ===== プレビューエリア ===== */
/* .wiki-content {
	font-size: 1.1em;
	line-height: 1.8;
	color: #222;
	background-color: #ffffff;
	padding: 20px;
	word-wrap: break-word;
} */

/* ===== 編集エリアのレイアウト調整 ===== */
.edit-container {
	display: flex;
	flex-direction: column;
	width: 100%;
	/* margin: 20px auto; */
	background: #f8f8f8;
	border-radius: 5px;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* ===== 上段：エディットエリア＆プレビューエリア（左右分割） ===== */
.edit-container .editor-preview-wrapper {
	display: flex;
	width: 100%;
}

/* 左側：エディットエリア */
.editor {
	width: 50%;
	display: flex;
	flex-direction: column;
	padding: 20px;
	background: #f8f8f8;
}

/* 右側：プレビューエリア */
.preview {
	width: 50%;
	padding: 20px;
	background: #ffffff;
	/* overflow-y: auto;
	max-height: 500px; */
}

/* 編集テキストエリア */
.editor textarea {
	width: 100%;
	/* min-height: 600px; */
	flex-grow: 1;
	padding: 10px;
	font-size: 1em;
	border: 1px solid #ccc;
	border-radius: 4px;
	box-sizing: border-box;
}

/* ===== 下段：保存・キャンセルボタン（幅100%） ===== */
.controls {
	width: 100%;
	display: flex;
	justify-content: center;
	gap: 10px;
	padding: 10px;
	background: #f0f0f0;
	border-radius: 0 0 5px 5px;
}

/* ボタンデザイン */
.controls button {
	padding: 10px 20px;
	font-size: 1em;
	color: white;
	background-color: #007bff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
}

.controls button:hover {
	background-color: #0056b3;
}

#cancel-button {
	background-color: #ccc;
}

#cancel-button:hover {
	background-color: #999;
}

/* ===== ログインフォームのスタイル ===== */
.login-container {
	max-width: 400px;
	margin: 50px auto;
	padding: 20px;
	background: #f8f8f8;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	text-align: center;
}

/* 見出し */
.login-container h1 {
	font-size: 1.5em;
	margin-bottom: 15px;
	color: #333;
}

/* エラーメッセージ */
.login-container .error-message {
	color: red;
	font-size: 0.9em;
	margin-bottom: 15px;
}

/* ラベル */
.login-container label {
	display: block;
	text-align: left;
	font-weight: bold;
	margin-bottom: 5px;
}

/* 入力フィールド */
.login-container input[type="text"],
.login-container input[type="password"] {
	width: 100%;
	padding: 10px;
	margin-bottom: 15px;
	border: 1px solid #ccc;
	border-radius: 5px;
	font-size: 1em;
	box-sizing: border-box;
}

/* ボタン */
.login-container button {
	width: 100%;
	padding: 10px;
	font-size: 1em;
	color: white;
	background-color: #007bff;
	border: none;
	border-radius: 5px;
	cursor: pointer;
}

.login-container button:hover {
	background-color: #0056b3;
}

/* フォーム全体の間隔 */
.login-container form {
	display: flex;
	flex-direction: column;
}

/* レスポンシブ対応 */
@media (max-width: 480px) {
	.login-container {
		width: 90%;
		padding: 15px;
	}
}

/* ===== レスポンシブ対応（スマホでは縦並び） ===== */
@media (max-width: 768px) {
	#edit-container {
		flex-direction: column;
	}

	.editor,
	.preview {
		width: 100%;
	}
}

/* ===== 隠すクラス ===== */
.hidden {
	display: none;
}