/* ============================================================
   Event Board — Plugin Styles
   プレフィックス .eb- でCocoonとの衝突を防ぐ
   ============================================================ */

/* ----- 共通ラッパー ----- */
.eb-form-wrap {
    max-width: 800px;
    margin: 0 auto;
    font-family: inherit;
}
.eb-list-wrap {
    margin: 0 auto;
    font-family: inherit;
}

/* ----- アラート ----- */
.eb-alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 24px;
    line-height: 1.6;
}
.eb-alert p { margin: 0 0 6px; }
.eb-alert p:last-child { margin-bottom: 0; }
.eb-alert-success {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #1b5e20;
}
.eb-alert-error {
    background: #fce4ec;
    border: 1px solid #f48fb1;
    color: #880e4f;
}

/* ----- 登録ゲート（メールアドレス確認） ----- */
.eb-gate-intro {
    margin: 0 0 20px;
    line-height: 1.7;
    color: #444;
}

/* ----- 登録・編集フォーム ----- */
.eb-form {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 32px;
}

.eb-field {
    margin-bottom: 22px;
}
.eb-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 14px;
}
.eb-required {
    color: #e53935;
    margin-left: 2px;
}
.eb-field-note {
    font-size: 12px;
    color: #888;
    margin: 0 0 6px;
}

.eb-field input[type="text"],
.eb-field input[type="email"],
.eb-field input[type="url"],
.eb-field input[type="datetime-local"],
.eb-field select,
.eb-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.2s;
    background: #fafafa;
}
.eb-field input:focus,
.eb-field textarea:focus {
    outline: none;
    border-color: #7b6cf2;
    background: #fff;
}
.eb-field input[type="file"] {
    font-size: 14px;
    color: #555;
}

/* セクション区切り */
.eb-section-label {
    font-size: 13px;
    font-weight: 700;
    color: #888;
    letter-spacing: 0.05em;
    margin: 28px 0 16px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}

/* 送信ボタン */
.eb-submit {
    margin-top: 28px;
    text-align: center;
}
.eb-btn-submit {
    background: #7b6cf2;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px 48px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.03em;
}
.eb-btn-submit:hover {
    background: #5e4fd0;
}
.eb-btn-submit:active {
    transform: translateY(1px);
}

/* 編集フォーム見出し */
.eb-edit-heading {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
    padding-left: 10px;
    border-left: 4px solid #7b6cf2;
}

/* 公開ページリンク */
.eb-edit-view-link {
    margin: -8px 0 16px;
}
.eb-edit-view-link a {
    font-size: 13px;
    color: #7b6cf2;
    text-decoration: none;
}
.eb-edit-view-link a:hover {
    text-decoration: underline;
}

/* 現在のサムネイル */
.eb-current-thumb {
    margin-bottom: 10px;
}
.eb-current-thumb img {
    max-width: 200px;
    border-radius: 8px;
    display: block;
    border: 1px solid #ddd;
}
.eb-current-thumb p {
    font-size: 12px;
    color: #999;
    margin: 4px 0 0;
}

/* ----- 開催予定⇔過去イベント 切り替えタブ ----- */
.eb-nav-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    border-bottom: 2px solid #eee;
}
.eb-nav-tab {
    padding: 10px 20px 8px;
    font-size: 14px;
    font-weight: 700;
    color: #888;
    text-decoration: none !important;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}
.eb-nav-tab:hover {
    color: #7b6cf2;
}
.eb-nav-tab.is-active {
    color: #7b6cf2;
    border-bottom-color: #7b6cf2;
}

/* 過去のイベントリンク */
.eb-archive-link-wrap {
    text-align: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}
.eb-archive-link {
    display: inline-block;
    color: #7b6cf2;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    padding: 10px 24px;
    border: 2px solid #7b6cf2;
    border-radius: 6px;
    transition: all 0.2s;
}
.eb-archive-link:hover {
    background: #7b6cf2;
    color: #fff !important;
}

/* タクソノミーアーカイブタイトル */
.eb-taxonomy-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin: 0 0 24px;
    padding-left: 14px;
    border-left: 4px solid #7b6cf2;
}

/* ----- 月グループ ----- */
.eb-month-group {
    margin-bottom: 48px;
}
.eb-month-heading {
    font-size: 18px;
    font-weight: 700;
    color: #444;
    margin: 0 0 16px;
    padding: 8px 0 8px 14px;
    border-left: 4px solid #7b6cf2;
    border-bottom: none;
}
.eb-month-heading-archive {
    border-left-color: #aaa;
    color: #888;
}
.eb-card-archive {
    opacity: 0.8;
}

/* ----- イベント一覧グリッド ----- */
.eb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 0;
}

/* ----- カード ----- */
.eb-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.eb-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
    transform: translateY(-2px);
}

/* チラシ画像（正方形） */
.eb-card-img {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f5f5f5;
}
.eb-card-img-link {
    display: block;
    width: 100%;
    height: 100%;
}

/* 画像なしプレースホルダー */
.eb-card-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ede9ff;
    color: #9e8ff5;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.eb-thumbnail {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: top;
    display: block;
}

.eb-card-body {
    padding: 18px 20px 20px;
}

.eb-card-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #222;
    line-height: 1.4;
}
.eb-card-title-link {
    color: inherit;
    text-decoration: none;
}
.eb-card-title-link:hover {
    color: #7b6cf2;
    text-decoration: underline;
}

/* メタ情報（日時・場所） */
.eb-meta {
    font-size: 13px;
    color: #555;
    margin: 4px 0;
    display: flex;
    align-items: flex-start;
    gap: 5px;
    line-height: 1.5;
}
.eb-icon {
    flex-shrink: 0;
    font-style: normal;
}

/* テーマバッジ */
.eb-meta-theme {
    margin-top: 8px;
    align-items: center;
}
.eb-badge {
    display: inline-block;
    background: #ede9ff;
    color: #5e4fd0;
    border-radius: 4px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.eb-badge-fee {
    background: #fff3e0;
    color: #e65100;
}
.eb-badge-community {
    background: #e3f2fd;
    color: #1565c0;
}

/* コミュニティ／主催者名リンク */
.eb-community-link {
    color: #1565c0;
    font-weight: 600;
    text-decoration: none;
}
.eb-community-link:hover {
    text-decoration: underline;
    color: #0d47a1;
}

/* ----- トグル（詳細を見る） ----- */
.eb-toggle {
    margin-top: 10px;
    border-top: 1px solid #f0f0f0;
}
.eb-toggle-label {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #7b6cf2;
    padding: 8px 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
    user-select: none;
}
.eb-toggle-label::-webkit-details-marker { display: none; }
.eb-toggle-label::after {
    content: '▼';
    font-size: 10px;
    transition: transform 0.2s;
}
.eb-toggle[open] .eb-toggle-label::after {
    transform: rotate(-180deg);
}
.eb-toggle-body {
    padding-bottom: 8px;
}

/* ----- 申し込みボタン ----- */
.eb-apply-btn {
    display: block;
    margin-top: 10px;
    padding: 10px 0;
    background: #43a047;
    color: #fff !important;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    border-radius: 6px;
    text-decoration: none !important;
    transition: background 0.2s;
}
.eb-apply-btn:hover {
    background: #2e7d32;
}
.eb-apply-btn-full {
    margin-top: 14px;
    padding: 14px 0;
    font-size: 16px;
    border-radius: 8px;
}

/* 内容説明 */
.eb-card-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.7;
    margin: 10px 0;
}

/* 主催者 */
.eb-card-organizer {
    font-size: 12px;
    color: #999;
    margin: 12px 0 0;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

/* 申し込みURL未設定時の案内 */
.eb-no-apply {
    font-size: 12px;
    color: #999;
    margin: 10px 0 0;
    line-height: 1.6;
}

/* 件なし */
.eb-empty {
    color: #aaa;
    text-align: center;
    padding: 48px 0;
    font-size: 14px;
}

/* ----- レスポンシブ ----- */
@media (max-width: 480px) {
    .eb-grid {
        grid-template-columns: 1fr;
    }
    .eb-form {
        padding: 20px 14px;
    }
    .eb-btn-submit {
        width: 100%;
    }
}

/* ============================================================
   Cocoon レイアウト制御
   ============================================================ */

/* 個別イベントページ: サイドバー非表示・1カラム */
body.eb-single-event #sidebar,
body.eb-single-event .sidebar {
    display: none !important;
}
body.eb-single-event #main {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

/* イベント一覧ページ: サイドバー非表示・フルワイド */
body.eb-event-list-page #sidebar,
body.eb-event-list-page .sidebar {
    display: none !important;
}
body.eb-event-list-page #main {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

/* ============================================================
   個別イベントページ
   ============================================================ */

/* ----- パンくずリスト ----- */
.eb-breadcrumb {
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.eb-breadcrumb-link {
    color: #7b6cf2;
    text-decoration: none;
}
.eb-breadcrumb-link:hover {
    text-decoration: underline;
}
.eb-breadcrumb-sep {
    color: #bbb;
    font-size: 14px;
}
.eb-breadcrumb-text {
    color: #555;
}

.eb-single-wrap {
    max-width: 900px;
    margin: 32px auto;
    padding: 0 16px;
}

/* 終了イベントのお知らせ */
.eb-past-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 24px;
}
.eb-past-notice-label {
    font-size: 14px;
    font-weight: 700;
    color: #777;
}
.eb-past-notice-link {
    font-size: 13px;
    font-weight: 700;
    color: #7b6cf2;
    text-decoration: none;
}
.eb-past-notice-link:hover {
    text-decoration: underline;
}

/* 個別ページ下部ナビ */
.eb-single-footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}
.eb-single-inner {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* 左：チラシ画像 */
.eb-single-image {
    flex: 0 0 320px;
    max-width: 320px;
}
.eb-single-thumbnail {
    width: 100% !important;
    height: auto !important;
    border-radius: 10px;
    display: block;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.eb-single-no-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f0f0f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 14px;
}

/* 右：イベント情報 */
.eb-single-info {
    flex: 1;
    min-width: 0;
}
.eb-single-title {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin: 0 0 20px;
    line-height: 1.4;
    border: none;
    padding: 0;
}

/* メタ情報テーブル */
.eb-single-meta {
    margin: 0 0 24px;
    padding: 0;
}
.eb-single-meta-row {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}
.eb-single-meta-row:first-child {
    border-top: 1px solid #f0f0f0;
}
.eb-single-meta-row dt {
    font-weight: 600;
    color: #555;
    font-size: 13px;
    white-space: nowrap;
    min-width: 100px;
}
.eb-single-meta-row dd {
    color: #333;
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
}

/* 内容説明 */
.eb-single-desc h3 {
    font-size: 15px;
    font-weight: 700;
    color: #555;
    margin: 0 0 10px;
    padding-left: 10px;
    border-left: 3px solid #7b6cf2;
}
.eb-single-desc-body {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
}

/* ----- シェアボタン ----- */
.eb-share {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}
.eb-share-label {
    font-size: 11px;
    color: #aaa;
    margin: 0 0 8px;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.eb-share-btns {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: max-content;
    margin: 0 auto;
}
.eb-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    transition: opacity 0.2s;
    color: #fff !important;
}
.eb-share-btn:hover {
    opacity: 0.85;
}
.eb-share-line { background: #06C755; }
.eb-share-x    { background: #000; }
.eb-share-fb   { background: #1877F2; }

/* スマホ：縦並びに切り替え */
@media (max-width: 680px) {
    .eb-single-inner {
        flex-direction: column;
    }
    .eb-single-image {
        flex: none;
        max-width: 100%;
        width: 100%;
    }
}

/* ============================================================
   利用者マニュアル [event_manual]
   ============================================================ */

.eb-manual-wrap {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 0 40px;
    font-family: inherit;
}

/* TOC */
.eb-manual-toc {
    background: #f3f0ff;
    border: 1px solid #e0ddf8;
    border-radius: 10px;
    padding: 20px 24px;
    margin: 24px 0 32px;
}
.eb-manual-toc-title {
    font-size: 13px;
    font-weight: 700;
    color: #7b6cf2;
    margin-bottom: 10px;
}
.eb-manual-toc ol {
    padding-left: 20px;
    margin: 0;
}
.eb-manual-toc li {
    margin: 5px 0;
    font-size: 14px;
}
.eb-manual-toc a {
    color: #5e4fd0;
    text-decoration: none;
}
.eb-manual-toc a:hover { text-decoration: underline; }

/* セクション */
.eb-manual-section {
    margin-bottom: 40px;
}
.eb-manual-heading {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #fff !important;
    background: #7b6cf2 !important;
    border-radius: 8px 8px 0 0 !important;
    padding: 12px 18px !important;
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin: 0 !important;
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
}
.eb-manual-heading-num {
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}
.eb-manual-body {
    background: #fff;
    border: 1px solid #e0ddf8;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 20px 22px 24px;
}
.eb-manual-body > p {
    margin-bottom: 14px;
    font-size: 14px;
    color: #444;
    line-height: 1.7;
}

/* ステップ */
.eb-manual-steps { list-style: none; padding: 0; margin: 0; }
.eb-manual-step {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}
.eb-manual-step:last-child { border-bottom: none; }
.eb-manual-step-num {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    background: #7b6cf2;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    margin-top: 2px;
}
.eb-manual-step-content h3 {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin: 0 0 6px;
}
.eb-manual-step-content p,
.eb-manual-step-content ul {
    font-size: 13px;
    color: #555;
    line-height: 1.7;
    margin: 0;
}
.eb-manual-step-content ul {
    padding-left: 16px;
    margin-top: 4px;
}
.eb-manual-step-content li { margin: 3px 0; }

/* フィールド表 */
.eb-manual-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 10px 0;
}
.eb-manual-table th {
    background: #f3f0ff;
    color: #5e4fd0;
    font-weight: 700;
    padding: 9px 12px;
    text-align: left;
    border: 1px solid #e0ddf8;
    white-space: nowrap;
    vertical-align: top;
}
.eb-manual-table td {
    padding: 9px 12px;
    border: 1px solid #eee;
    vertical-align: top;
    line-height: 1.6;
}
.eb-manual-table tr:nth-child(even) td { background: #fafafa; }

/* 必須バッジ */
.eb-manual-req {
    display: inline-block;
    background: #fce4ec;
    color: #c62828;
    border-radius: 3px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 3px;
    vertical-align: middle;
}
.eb-manual-opt {
    display: inline-block;
    background: #f0f0f0;
    color: #999;
    border-radius: 3px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 3px;
    vertical-align: middle;
}

/* 注意・情報ボックス */
.eb-manual-note {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 10px 0;
    font-size: 13px;
    color: #5d4037;
    line-height: 1.6;
}
.eb-manual-info {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 10px 0;
    font-size: 13px;
    color: #1b5e20;
    line-height: 1.6;
}

/* メール本文サンプル */
.eb-manual-mail {
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 16px;
    font-size: 12px;
    color: #444;
    white-space: pre-line;
    line-height: 1.8;
    margin: 10px 0;
    font-family: monospace;
}
.eb-manual-highlight {
    background: #fffde7;
    padding: 1px 3px;
    border-radius: 2px;
}

/* URLボックス */
.eb-manual-url {
    background: #f3f0ff;
    border: 1px solid #c5b9ff;
    border-radius: 5px;
    padding: 8px 12px;
    font-size: 12px;
    color: #5e4fd0;
    word-break: break-all;
    margin: 6px 0;
    font-family: monospace;
}

/* リンクボタン */
.eb-manual-btn {
    display: inline-block;
    background: #7b6cf2;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 6px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 700;
    margin: 4px 4px 4px 0;
    transition: background 0.2s;
}
.eb-manual-btn:hover { background: #5e4fd0 !important; }
.eb-manual-btn-outline {
    display: inline-block;
    border: 2px solid #7b6cf2;
    color: #7b6cf2 !important;
    text-decoration: none !important;
    border-radius: 6px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 700;
    margin: 4px;
    transition: all 0.2s;
}
.eb-manual-btn-outline:hover { background: #7b6cf2 !important; color: #fff !important; }

@media (max-width: 600px) {
    .eb-manual-body { padding: 16px 14px 18px; }
    .eb-manual-table { font-size: 12px; }
    .eb-manual-table th,
    .eb-manual-table td { padding: 7px 8px; }
    .eb-manual-step { gap: 10px; }
    .eb-manual-heading { font-size: 15px; }
}
