/* Textarea Resize Fix */

/* 全てのtextarea要素でリサイズを有効化 */
textarea {
    resize: vertical !important;
    min-height: 80px !important;
    -webkit-appearance: textarea !important;
    -moz-appearance: textfield-multiline !important;
}

/* form-control クラスのtextareaも対象 */
textarea.form-control {
    resize: vertical !important;
    overflow: auto !important;
}

/* リサイズハンドルの表示を確実にする */
textarea::-webkit-resizer {
    display: block !important;
}

/* 特定のtextarea要素に対する設定 */
#topUpperFreeSpace,
#topLowerFreeSpace, 
#articleUpperFreeSpace,
#articleLowerFreeSpace,
#googleSearchConsole,
#googleAnalytics,
#facebookPixel,
#customHeadCode,
#articleContent,
#siteDescription,
#aboutText,
#privacyText,
#contactText,
#sitemapText {
    resize: vertical !important;
    min-height: 100px !important;
    max-height: 500px !important;
}

/* エディタページのtextarea */
.editor-container textarea,
.content-editor textarea {
    resize: vertical !important;
    min-height: 200px !important;
}

/* モーダル内のtextarea */
.modal textarea {
    resize: vertical !important;
    min-height: 100px !important;
}

/* 管理画面全体での強制適用 */
.admin-content textarea,
.main-content textarea {
    resize: vertical !important;
}

/* ドラッグ中のスタイル */
textarea:active {
    cursor: ns-resize !important;
}

/* フォーカス時のスタイル */
textarea:focus {
    outline: 1px solid var(--primary-color);
    resize: vertical !important;
}

/* 無効化されたtextareaは除外 */
textarea:disabled {
    resize: none !important;
    cursor: not-allowed;
}

/* 読み取り専用のtextareaは除外 */
textarea[readonly] {
    resize: none !important;
    cursor: default;
}