/* ==============================================
   エディタ装飾プラグイン - フロントエンドCSS
   ============================================== */

/* -----------------------------------------------
   1. ボックス共通
   ----------------------------------------------- */
.dec-box {
    margin: 1.5em 0;
    border-radius: 4px;
    overflow: hidden;
}

.dec-box .dec-box-content {
    padding: 1em 1.2em;
}

.dec-box .dec-box-content p:last-child {
    margin-bottom: 0;
}

/* --- タイトル付きボックス --- */
.dec-box-titled .dec-box-title {
    padding: 0.6em 1.2em;
    font-weight: bold;
    color: #fff;
}

.dec-box-titled .dec-box-content {
    border-left: 2px solid;
    border-right: 2px solid;
    border-bottom: 2px solid;
    border-radius: 0 0 4px 4px;
}

/* --- シンプルボックス --- */
.dec-box-simple {
    border: 2px solid;
}

/* --- 吹き出しボックス --- */
.dec-box-balloon {
    position: relative;
    border: 2px solid;
    border-radius: 12px;
    overflow: visible;
    margin-bottom: 2.5em;
}

.dec-box-balloon::before,
.dec-box-balloon::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 30px;
    width: 0;
    height: 0;
    border-style: solid;
}

/* 外側の三角（ボーダー色） */
.dec-box-balloon::before {
    bottom: -22px;
    border-width: 22px 14px 0 14px;
    border-color: currentColor transparent transparent transparent;
}

/* 内側の三角（背景色） */
.dec-box-balloon::after {
    bottom: -18px;
    border-width: 20px 12px 0 12px;
    left: 32px;
}

/* -----------------------------------------------
   ボックス色バリエーション
   ----------------------------------------------- */

/* --- 青 --- */
.dec-box-blue.dec-box-titled .dec-box-title {
    background: #3b82f6;
}
.dec-box-blue.dec-box-titled .dec-box-content {
    border-color: #3b82f6;
    background: #eff6ff;
}
.dec-box-blue.dec-box-simple {
    border-color: #3b82f6;
    background: #eff6ff;
}
.dec-box-blue.dec-box-balloon {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #3b82f6;
}
.dec-box-blue.dec-box-balloon::after {
    border-color: #eff6ff transparent transparent transparent;
}

/* --- 赤 --- */
.dec-box-red.dec-box-titled .dec-box-title {
    background: #ef4444;
}
.dec-box-red.dec-box-titled .dec-box-content {
    border-color: #ef4444;
    background: #fef2f2;
}
.dec-box-red.dec-box-simple {
    border-color: #ef4444;
    background: #fef2f2;
}
.dec-box-red.dec-box-balloon {
    border-color: #ef4444;
    background: #fef2f2;
    color: #ef4444;
}
.dec-box-red.dec-box-balloon::after {
    border-color: #fef2f2 transparent transparent transparent;
}

/* --- 黄 --- */
.dec-box-yellow.dec-box-titled .dec-box-title {
    background: #f59e0b;
}
.dec-box-yellow.dec-box-titled .dec-box-content {
    border-color: #f59e0b;
    background: #fffbeb;
}
.dec-box-yellow.dec-box-simple {
    border-color: #f59e0b;
    background: #fffbeb;
}
.dec-box-yellow.dec-box-balloon {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #f59e0b;
}
.dec-box-yellow.dec-box-balloon::after {
    border-color: #fffbeb transparent transparent transparent;
}

/* --- 緑 --- */
.dec-box-green.dec-box-titled .dec-box-title {
    background: #22c55e;
}
.dec-box-green.dec-box-titled .dec-box-content {
    border-color: #22c55e;
    background: #f0fdf4;
}
.dec-box-green.dec-box-simple {
    border-color: #22c55e;
    background: #f0fdf4;
}
.dec-box-green.dec-box-balloon {
    border-color: #22c55e;
    background: #f0fdf4;
    color: #22c55e;
}
.dec-box-green.dec-box-balloon::after {
    border-color: #f0fdf4 transparent transparent transparent;
}

/* --- グレー --- */
.dec-box-gray.dec-box-titled .dec-box-title {
    background: #6b7280;
}
.dec-box-gray.dec-box-titled .dec-box-content {
    border-color: #6b7280;
    background: #f3f4f6;
}
.dec-box-gray.dec-box-simple {
    border-color: #6b7280;
    background: #f3f4f6;
}
.dec-box-gray.dec-box-balloon {
    border-color: #6b7280;
    background: #f3f4f6;
    color: #6b7280;
}
.dec-box-gray.dec-box-balloon::after {
    border-color: #f3f4f6 transparent transparent transparent;
}

/* --- ピンク --- */
.dec-box-pink.dec-box-titled .dec-box-title {
    background: #ec4899;
}
.dec-box-pink.dec-box-titled .dec-box-content {
    border-color: #ec4899;
    background: #fdf2f8;
}
.dec-box-pink.dec-box-simple {
    border-color: #ec4899;
    background: #fdf2f8;
}
.dec-box-pink.dec-box-balloon {
    border-color: #ec4899;
    background: #fdf2f8;
    color: #ec4899;
}
.dec-box-pink.dec-box-balloon::after {
    border-color: #fdf2f8 transparent transparent transparent;
}

/* 吹き出し内テキストは黒に戻す */
.dec-box-balloon .dec-box-content {
    color: #333;
}

/* -----------------------------------------------
   2. マーカー（蛍光ペン風）
   ----------------------------------------------- */
.dec-marker {
    padding: 0.1em 0.2em;
    font-style: inherit;
}

.dec-marker-yellow {
    background: linear-gradient(transparent 60%, #fde68a 60%);
}

.dec-marker-pink {
    background: linear-gradient(transparent 60%, #fbcfe8 60%);
}

.dec-marker-blue {
    background: linear-gradient(transparent 60%, #bfdbfe 60%);
}

.dec-marker-green {
    background: linear-gradient(transparent 60%, #bbf7d0 60%);
}

/* -----------------------------------------------
   3. 文字色
   ----------------------------------------------- */
.dec-text-red {
    color: #dc2626;
}

.dec-text-blue {
    color: #2563eb;
}

.dec-text-green {
    color: #16a34a;
}

.dec-text-orange {
    color: #ea580c;
}

.dec-text-gray {
    color: #6b7280;
}

/* -----------------------------------------------
   4. 注意書き
   ----------------------------------------------- */
.dec-notice {
    margin: 1.5em 0;
    padding: 1em 1.2em 1em 3.2em;
    border-radius: 4px;
    position: relative;
}

.dec-notice::before {
    position: absolute;
    left: 1em;
    top: 1em;
    font-size: 1.3em;
    line-height: 1;
}

.dec-notice .dec-notice-content p:last-child {
    margin-bottom: 0;
}

/* 注意 */
.dec-notice-warning {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
}

.dec-notice-warning::before {
    content: '⚠';
}

/* 情報 */
.dec-notice-info {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
}

.dec-notice-info::before {
    content: 'ℹ';
}

/* ポイント */
.dec-notice-point {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
}

.dec-notice-point::before {
    content: '★';
    color: #22c55e;
}

/* -----------------------------------------------
   5. カラム
   ----------------------------------------------- */
.dec-columns {
    display: flex;
    flex-wrap: wrap;
    margin: 1.5em 0;
}

.dec-column {
    box-sizing: border-box;
    min-height: 1px;
}

.dec-column p:last-child {
    margin-bottom: 0;
}

/* 余白有り */
.dec-columns-gap {
    gap: 1.5em;
}

/* 余白無し */
.dec-columns-nogap {
    gap: 0;
}

/* 2カラム */
.dec-columns-2.dec-columns-gap > .dec-column {
    flex: 0 0 calc(50% - 0.75em);
}

.dec-columns-2.dec-columns-nogap > .dec-column {
    flex: 0 0 50%;
}

/* 3カラム */
.dec-columns-3.dec-columns-gap > .dec-column {
    flex: 0 0 calc(33.333% - 1em);
}

.dec-columns-3.dec-columns-nogap > .dec-column {
    flex: 0 0 33.333%;
}

/* 4カラム */
.dec-columns-4.dec-columns-gap > .dec-column {
    flex: 0 0 calc(25% - 1.125em);
}

.dec-columns-4.dec-columns-nogap > .dec-column {
    flex: 0 0 25%;
}

/* カラム内にボーダー付き（余白無し時） */
.dec-columns-nogap > .dec-column {
    border: 1px solid #e5e7eb;
    padding: 1em;
}

/* カラム内（余白有り時） */
.dec-columns-gap > .dec-column {
    background: #f9fafb;
    border-radius: 4px;
    padding: 1em;
}

/* レスポンシブ: 768px以下で縦並び */
@media screen and (max-width: 768px) {
    .dec-columns {
        flex-direction: column;
    }

    .dec-columns-2.dec-columns-gap > .dec-column,
    .dec-columns-3.dec-columns-gap > .dec-column,
    .dec-columns-4.dec-columns-gap > .dec-column {
        flex: 0 0 100%;
    }

    .dec-columns-2.dec-columns-nogap > .dec-column,
    .dec-columns-3.dec-columns-nogap > .dec-column,
    .dec-columns-4.dec-columns-nogap > .dec-column {
        flex: 0 0 100%;
    }
}

/* -----------------------------------------------
   6. アイコン
   ----------------------------------------------- */
.dec-icon {
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
    font-style: normal;
    font-size: 1.2em;
}

.dec-icon-check { color: #22c55e; }
.dec-icon-arrow { color: #3b82f6; }
.dec-icon-star { color: #f59e0b; }
.dec-icon-heart { color: #ef4444; }
.dec-icon-exclamation { color: #ef4444; }
.dec-icon-question { color: #3b82f6; }
.dec-icon-play { color: #6b7280; }
.dec-icon-circle { color: #6b7280; }

/* -----------------------------------------------
   7. 装飾リスト
   ----------------------------------------------- */
.dec-list {
    list-style: none;
    padding-left: 0;
    margin: 1.5em 0;
}

.dec-list li {
    position: relative;
    padding-left: 1.8em;
    margin-bottom: 0.5em;
    line-height: 1.7;
}

.dec-list li::before {
    position: absolute;
    left: 0;
    top: 0;
    font-style: normal;
    line-height: 1.7;
}

/* チェック */
.dec-list-check li::before {
    content: '\2714';
    color: #22c55e;
}

/* 丸 */
.dec-list-circle li::before {
    content: '\25CF';
    color: #3b82f6;
}

/* 矢印 */
.dec-list-arrow li::before {
    content: '\27A4';
    color: #f59e0b;
}

/* 星 */
.dec-list-star li::before {
    content: '\2605';
    color: #f59e0b;
}

/* ダイヤ */
.dec-list-diamond li::before {
    content: '\25C6';
    color: #ec4899;
}

/* 三角 */
.dec-list-triangle li::before {
    content: '\25B8';
    color: #6b7280;
}

/* -----------------------------------------------
   8. Q&Aブロック
   ----------------------------------------------- */
.dec-qa {
    margin: 1.5em 0;
}

.dec-qa-item {
    margin-bottom: 1em;
}

.dec-qa-q,
.dec-qa-a {
    display: flex;
    align-items: flex-start;
    padding: 0.8em 1em;
    gap: 0.8em;
}

.dec-qa-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2em;
    height: 2em;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.1em;
    color: #fff;
    flex-shrink: 0;
}

.dec-qa-text {
    flex: 1;
    line-height: 2em;
}

.dec-qa-q {
    border-radius: 6px 6px 0 0;
    font-weight: bold;
}

.dec-qa-a {
    border-radius: 0 0 6px 6px;
    border-top: none;
}

/* Q&A 青 */
.dec-qa-blue .dec-qa-q { background: #eff6ff; }
.dec-qa-blue .dec-qa-q .dec-qa-label { background: #3b82f6; }
.dec-qa-blue .dec-qa-a { background: #f8fafc; }
.dec-qa-blue .dec-qa-a .dec-qa-label { background: #64748b; }

/* Q&A 赤 */
.dec-qa-red .dec-qa-q { background: #fef2f2; }
.dec-qa-red .dec-qa-q .dec-qa-label { background: #ef4444; }
.dec-qa-red .dec-qa-a { background: #f8fafc; }
.dec-qa-red .dec-qa-a .dec-qa-label { background: #64748b; }

/* Q&A 緑 */
.dec-qa-green .dec-qa-q { background: #f0fdf4; }
.dec-qa-green .dec-qa-q .dec-qa-label { background: #22c55e; }
.dec-qa-green .dec-qa-a { background: #f8fafc; }
.dec-qa-green .dec-qa-a .dec-qa-label { background: #64748b; }

/* Q&A グレー */
.dec-qa-gray .dec-qa-q { background: #f3f4f6; }
.dec-qa-gray .dec-qa-q .dec-qa-label { background: #6b7280; }
.dec-qa-gray .dec-qa-a { background: #f8fafc; }
.dec-qa-gray .dec-qa-a .dec-qa-label { background: #9ca3af; }

/* -----------------------------------------------
   9. リンクボタン
   ----------------------------------------------- */
.dec-btn {
    display: inline-block;
    padding: 0.7em 2em;
    font-size: 1em;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
    line-height: 1.5;
}

.dec-btn:hover {
    opacity: 0.8;
    text-decoration: none;
}

/* ソリッド */
.dec-btn-solid {
    border: none;
    border-radius: 4px;
    color: #fff;
}

/* アウトライン */
.dec-btn-outline {
    background: transparent;
    border: 2px solid;
    border-radius: 4px;
}

/* 角丸 */
.dec-btn-round {
    border: none;
    border-radius: 50px;
    color: #fff;
}

/* ボタン色: 青 */
.dec-btn-blue.dec-btn-solid { background: #3b82f6; }
.dec-btn-blue.dec-btn-outline { border-color: #3b82f6; color: #3b82f6; }
.dec-btn-blue.dec-btn-round { background: #3b82f6; }

/* ボタン色: 赤 */
.dec-btn-red.dec-btn-solid { background: #ef4444; }
.dec-btn-red.dec-btn-outline { border-color: #ef4444; color: #ef4444; }
.dec-btn-red.dec-btn-round { background: #ef4444; }

/* ボタン色: 緑 */
.dec-btn-green.dec-btn-solid { background: #22c55e; }
.dec-btn-green.dec-btn-outline { border-color: #22c55e; color: #22c55e; }
.dec-btn-green.dec-btn-round { background: #22c55e; }

/* ボタン色: オレンジ */
.dec-btn-orange.dec-btn-solid { background: #f59e0b; }
.dec-btn-orange.dec-btn-outline { border-color: #f59e0b; color: #f59e0b; }
.dec-btn-orange.dec-btn-round { background: #f59e0b; }

/* ボタン色: グレー */
.dec-btn-gray.dec-btn-solid { background: #6b7280; }
.dec-btn-gray.dec-btn-outline { border-color: #6b7280; color: #6b7280; }
.dec-btn-gray.dec-btn-round { background: #6b7280; }
