/* ========================================================================

   AI Auto Poster - Page-specific styles

   ------------------------------------------------------------------------

   タブ/サブメニュー固有のスタイル: dashboard / prompts / logs (generated

   posts table) / rss-feeds / quickpost / task-card / faq / terms など。

   ======================================================================== */



/* .aiap-wrap は WP コアの .wrap と同じ要素に乗る (`<div class="wrap aiap-wrap">`)。

   WP コアの .wrap が独自に持っている margin と max-width を尊重し、ここでは

   max-width:none だけ宣言して、プラグイン側コンテンツが幅制限なく広がれるようにする。

   (旧版にあった margin-right:20px は WP の .wrap{margin-right:20px(desktop)/12px(mobile)}

   に上乗せされて右余白が二重になっていた上、モバイルで box-sizing:border-box +

   width:100% を強制するルールと組み合わさるとボックスが viewport を超えて切られる

   原因になっていたため削除。) */

.aiap-wrap{max-width:none}

.aiap-page-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin-bottom:12px}

.aiap-page-head h1{margin:0}

.aiap-tab-icon{font-size:16px;width:16px;height:16px}

/* Sub tabs (provider/image service tabs) */

.aiap-sub-tabs{display:flex;gap:0;background:var(--card);border:1px solid var(--bdr);border-radius:var(--r);overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;margin-bottom:14px}

.aiap-sub-tabs::-webkit-scrollbar{display:none}

.aiap-sub-tab{padding:9px 14px;font-size:11px;font-weight:600;color:var(--txt-m);border-right:1px solid var(--bdr-l);display:inline-flex;align-items:center;gap:5px;white-space:nowrap;text-decoration:none;transition:.15s;flex-shrink:0}

.aiap-sub-tab:last-child{border-right:none}

.aiap-sub-tab:hover{background:var(--blue-bg);color:var(--blue)}

.aiap-sub-tab.active{background:var(--blue);color:#fff}

.aiap-sub-tab.active .ico{filter:brightness(2.5) saturate(.4)}

.aiap-task-options{

    display: flex;

    flex-wrap: wrap;

    gap: 14px 20px;

    margin: 6px 0 12px;

    padding: 10px 12px;

    background: #f6f7f7;

    border: 1px solid #eaeaec;

    border-radius: 4px;

}

.aiap-task-options > label{

    display: inline-flex;

    align-items: center;

    gap: 6px;

    font-size: 13px;

}

.aiap-task-options select,

.aiap-task-options input[type="number"]{

    max-width: 100%;

}

.aiap-task-option-label{

    font-weight: 600;

    color: #50575e;

    white-space: nowrap;

}

.aiap-quality-bar{position:relative;height:12px;border-radius:6px;background:linear-gradient(to right,#22c55e,#eab308,#ef4444);margin:12px 0}

.aiap-quality-knob{position:absolute;left:20%;top:-4px;width:20px;height:20px;background:#fff;border:2px solid #ccc;border-radius:50%;box-shadow:0 1px 3px rgba(0,0,0,.2)}

.aiap-quality-labels{display:flex;justify-content:space-between;font-size:11px;color:#646970}

.aiap-log-status{display:inline-block;width:7px;height:7px;border-radius:50%;background:gray}

.aiap-log-status-success{background:var(--green)}

.aiap-log-status-error{background:var(--red)}

.aiap-log-status-info{background:var(--txt-l)}

/* Plan & Usage カード */

.aiap-plan-card{margin-bottom:16px}

.aiap-plan-status{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:8px}

.aiap-plan-name{font-size:15px;font-weight:600}

.aiap-plan-name-pro{color:#7c3aed}

.aiap-plan-name-trial{color:#dc2626}

/* BotWriter-like scroll sections for provider settings */

.aiap-provider-picker{

    background: linear-gradient(135deg,#5b7cfa 0%,#7f54b3 100%);

    border-radius: 6px;

    padding: 18px 24px 20px;

    margin: 2px 0 20px;

}

.aiap-provider-picker label{

    display: block;

    color: #fff;

    font-size: 16px;

    font-weight: 700;

    margin: 0 0 12px;

}

.aiap-provider-picker select{

    width: 100%;

    max-width: none;

    min-height: 34px;

    border-color: transparent;

    border-radius: 4px;

}

.aiap-provider-card{

    scroll-margin-top: 52px;

}

/* Execution logs: keep each log entry on one line */

.aiap-log-table th,

.aiap-log-table td{white-space:nowrap}

/* 左カラム内の保存ボタンは余白を最小限に(縦に間延びしない) */

.aiap-prompts-col-system .aiap-prompts-form .submit,

.aiap-prompts-col-system > .submit {

    margin-top: 12px;

    padding: 0;

}

/* ============================================

   Generated posts list table (Logs tab)

   - WP_List_Table の標準スタイル(.wp-list-table)に乗せる調整のみ。

   - サムネ画像のサイズとアクションボタン列の最小幅を整える。

   ============================================ */

.aiap-logs-table-section .wp-list-table th,

.aiap-logs-table-section .wp-list-table td {

    vertical-align: middle;

}

/* ヘッダー: 「投稿ステータス」のような長めのラベルとソート矢印が改行されないように nowrap。

   sort 矢印は WP 標準で <span> として末尾に追加されるため、これも一緒に1行に保つ。 */

.aiap-logs-table-section .wp-list-table thead th,

.aiap-logs-table-section .wp-list-table tfoot th {

    white-space: nowrap;

}

.aiap-logs-table-section .wp-list-table .column-image,

.aiap-logs-table-section .wp-list-table .column-actions {

    width: 80px;

}

.aiap-logs-table-section .wp-list-table .column-published {

    width: 180px;

    white-space: nowrap;

}

.aiap-logs-table-section .wp-list-table .column-status {

    width: 130px;

}

.aiap-logs-table-section .wp-list-table .column-writer {

    width: 110px;

}

.aiap-logs-table-section .wp-list-table .column-created_at {

    width: 150px;

    white-space: nowrap;

}

.aiap-logs-table-section img.aiap-logs-thumb {

    width: 60px;

    height: 60px;

    object-fit: cover;

    border-radius: 4px;

    display: block;

}

/* アクション列・公開列のボタンは inline-flex でアイコンとテキストを縦中央揃えにする。

   dashicons はデフォルトで vertical-align: top のため、line-height やテキストとズレやすい。

   inline-flex + align-items: center で一貫したベースライン。 */

.aiap-logs-table-section .column-actions .button-small,

.aiap-logs-table-section .column-published .button-small {

    display: inline-flex;

    align-items: center;

    gap: 4px;

    padding: 2px 8px;

    line-height: 1.6;

    height: auto;

}

.aiap-logs-table-section .column-actions .button-small .dashicons,

.aiap-logs-table-section .column-published .button-small .dashicons {

    font-size: 16px;

    width: 16px;

    height: 16px;

    line-height: 1;

    vertical-align: middle;

    /* flex 子要素として配置されるので margin は親 gap で吸収 */

    margin: 0;

}

.aiap-logs-table-section .column-actions .aiap-delete-btn {

    color: #b32d2e;

    border-color: #b32d2e;

    /* アイコンのみのボタンは正方形気味に */

    padding: 2px 8px;

}

.aiap-logs-table-section .column-actions .aiap-delete-btn:hover {

    background: #b32d2e;

    color: #fff;

}

.aiap-img-hero{margin:8px 0 24px;padding:0 4px}

.aiap-img-hero-eyebrow{display:inline-block;font-size:11px;font-weight:700;letter-spacing:.18em;color:var(--txt-l);text-transform:uppercase;margin-bottom:12px}

.aiap-img-hero-title{font-size:22px;line-height:1.45;letter-spacing:-.005em;color:var(--txt);margin:0;font-weight:700;border:0;padding:0}

/* セクションリード文 (img-hero-sub / imgset-lede / provider-hero-sub): 3 種類で同一スタイルなので集約 */

.aiap-img-hero-sub,

.aiap-imgset-lede,

.aiap-provider-hero-sub{margin-top:8px;font-size:13px;color:var(--txt-m);line-height:1.6}

.aiap-preset-card{position:relative;background:var(--card);border:1.5px solid var(--bdr);border-radius:12px;padding:0;cursor:pointer;transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;overflow:hidden;text-align:left;width:100%;font-family:inherit;color:inherit;display:block}

/* タイル系カード (preset / imgset / provider-tile) の hover: 3 種類で同一スタイルなので集約 */

.aiap-preset-card:hover,

.aiap-imgset-card:hover,

.aiap-provider-tile:hover{border-color:var(--txt-l);transform:translateY(-1px);box-shadow:0 4px 16px -4px rgba(15,23,42,.08)}

/* タイル系カードの選択状態: 3 種類で同一スタイルなので集約 */

.aiap-preset-card.is-selected,

.aiap-imgset-card.is-selected,

.aiap-provider-tile.is-selected{border-color:var(--txt);box-shadow:0 12px 40px -8px rgba(15,23,42,.12),0 0 0 3px rgba(29,35,39,.04)}

.aiap-preset-card:focus-visible{outline:2px solid var(--blue);outline-offset:2px}

.aiap-preset-visual{display:flex;align-items:center;justify-content:center;height:110px;width:100%}

.aiap-preset-card-blog .aiap-preset-visual{background:linear-gradient(135deg,#fef3c7 0%,#fed7aa 100%);color:#c2410c}

.aiap-preset-card-sns  .aiap-preset-visual{background:linear-gradient(135deg,#d1fae5 0%,#a7f3d0 100%);color:#047857}

.aiap-preset-card-lite .aiap-preset-visual{background:linear-gradient(135deg,#e0e7ff 0%,#c7d2fe 100%);color:#3730a3}

.aiap-preset-icon{width:56px;height:56px;display:block}

.aiap-preset-body{padding:16px 18px 18px;display:flex;flex-direction:column;gap:6px}

.aiap-preset-title{font-size:16px;font-weight:700;color:var(--txt);display:flex;align-items:center;justify-content:space-between;gap:8px}

.aiap-preset-sub{font-size:13px;color:var(--txt-m);line-height:1.55}

.aiap-preset-meta{display:flex;gap:8px;margin-top:8px;flex-wrap:wrap}

.aiap-preset-chip{font-size:11px;font-weight:600;color:var(--txt-m);background:var(--bdr-l);padding:3px 9px;border-radius:999px}

.aiap-preset-check{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:700;color:var(--txt);opacity:0;transform:translateY(2px);transition:opacity .2s ease,transform .2s ease}

.aiap-preset-check svg{background:var(--txt);border-radius:50%;color:#fff;padding:2px}

.aiap-preset-card.is-selected .aiap-preset-check{opacity:1;transform:translateY(0)}

/* ============================================

   画像設定 — 用途プリセットUI (新デザイン)

   全セレクタは .aiap-imgset- プレフィックスで衝突回避

   ============================================ */

.aiap-imgset-form{margin:0}

.aiap-imgset{max-width:780px;margin:0 auto}

.aiap-imgset-hero{margin:8px 4px 22px}

.aiap-imgset-eyebrow{display:inline-block;font-size:11px;font-weight:700;letter-spacing:.18em;color:var(--txt-l);text-transform:uppercase;margin-bottom:10px}

.aiap-imgset-title{font-size:22px;font-weight:700;line-height:1.45;letter-spacing:-.005em;color:var(--txt);margin:0;border:0;padding:0}

/* .aiap-imgset-lede は img-hero-sub 群と集約済み (上記) */

.aiap-imgset-presets{display:grid;grid-template-columns:1fr;gap:12px;margin-bottom:18px;padding:0}

.aiap-imgset-card{position:relative;background:var(--card);border:1.5px solid var(--bdr);border-radius:12px;padding:0;cursor:pointer;transition:border-color .2s,box-shadow .2s,transform .2s;overflow:hidden;text-align:left;width:100%;font-family:inherit;color:inherit;display:flex;flex-direction:column;-webkit-appearance:none;-moz-appearance:none;appearance:none}

/* :hover / .is-selected は preset-card 群と集約済み (上記) */

.aiap-imgset-card:focus-visible{outline:2px solid var(--blue);outline-offset:2px}

.aiap-imgset-card__visual{display:flex;align-items:center;justify-content:center;height:110px;width:100%;box-sizing:border-box}

.aiap-imgset-card--blog .aiap-imgset-card__visual{background:linear-gradient(135deg,#fef3c7 0%,#fed7aa 100%)}

.aiap-imgset-card--sns  .aiap-imgset-card__visual{background:linear-gradient(135deg,#d1fae5 0%,#a7f3d0 100%)}

.aiap-imgset-card--lite .aiap-imgset-card__visual{background:linear-gradient(135deg,#e0e7ff 0%,#c7d2fe 100%)}

.aiap-imgset-card__visual svg{display:block}

.aiap-imgset-card__body{display:flex;flex-direction:column;gap:6px;padding:16px 18px 18px;width:100%;box-sizing:border-box}

.aiap-imgset-card__title{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:15px;font-weight:700;color:var(--txt);width:100%}

.aiap-imgset-card__name{display:inline-block}

.aiap-imgset-card__sub{display:block;font-size:12.5px;color:var(--txt-m);line-height:1.55}

.aiap-imgset-card__chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px;width:100%}

.aiap-imgset-card__chip{display:inline-block;font-size:10.5px;font-weight:600;color:var(--txt-m);background:var(--bdr-l);padding:3px 9px;border-radius:999px}

.aiap-imgset-card__check{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:700;color:var(--txt);opacity:0;transform:translateY(2px);transition:opacity .2s,transform .2s;flex-shrink:0}

.aiap-imgset-card__check svg{background:var(--txt);border-radius:50%;color:#fff;padding:2px;width:14px;height:14px;flex-shrink:0}

.aiap-imgset-card.is-selected .aiap-imgset-card__check{opacity:1;transform:translateY(0)}

.aiap-imgset-current{display:flex;align-items:center;gap:12px;background:var(--card);border:1px solid var(--bdr);border-radius:10px;padding:13px 16px;margin-bottom:18px}

.aiap-imgset-current__dot{width:8px;height:8px;border-radius:50%;background:var(--txt);flex-shrink:0}

.aiap-imgset-current__text{flex:1;font-size:12.5px;color:var(--txt-m);line-height:1.5}

.aiap-imgset-current__text strong{color:var(--txt);font-weight:700;font-size:13px;margin-right:6px}

.aiap-imgset-advanced{margin-top:22px;border-top:1px solid var(--bdr);padding-top:18px}

.aiap-imgset-advanced__toggle{display:flex;align-items:center;justify-content:space-between;width:100%;padding:12px 16px;background:var(--card);border:1px solid var(--bdr);border-radius:8px;font-family:inherit;font-size:13px;font-weight:600;color:var(--txt);cursor:pointer;text-align:left;transition:border-color .15s}

.aiap-imgset-advanced__toggle:hover{border-color:var(--txt-l)}

.aiap-imgset-advanced__label{display:flex;flex-direction:column;text-align:left}

.aiap-imgset-advanced__label-main{display:block}

.aiap-imgset-advanced__caption{display:block;font-size:11px;font-weight:500;color:var(--txt-l);margin-top:2px;letter-spacing:.02em}

.aiap-imgset-advanced__chev{transition:transform .2s;color:var(--txt-l);flex-shrink:0;margin-left:10px}

.aiap-imgset-advanced.is-open .aiap-imgset-advanced__chev{transform:rotate(180deg)}

.aiap-imgset-advanced__panel{display:none;margin-top:10px;padding:18px;background:var(--card);border:1px solid var(--bdr);border-radius:8px}

.aiap-imgset-advanced.is-open .aiap-imgset-advanced__panel{display:block}

.aiap-imgset-field{display:flex;flex-direction:column;gap:6px;margin-bottom:16px}

.aiap-imgset-field:last-child{margin-bottom:0}

.aiap-imgset-field > label{font-size:12.5px;font-weight:600;color:var(--txt)}

.aiap-imgset-field input[type=number]{font-family:inherit;font-size:13px;padding:7px 10px;border:1px solid var(--bdr);border-radius:6px;background:#fff;color:var(--txt);width:90px;max-width:100%;box-sizing:border-box}

.aiap-imgset-field select.aiap-full-select{width:100%;max-width:100%}

.aiap-imgset-field__row{display:flex;align-items:center;gap:8px}

.aiap-imgset-field__unit{font-size:12.5px;color:var(--txt-m)}

.aiap-imgset-field__hint{font-size:11.5px;color:var(--txt-l);line-height:1.5}

.aiap-imgset-field__note{font-size:12px;color:var(--txt-l);background:var(--blue-bg);padding:10px 12px;border-radius:6px;margin:14px 0 0;line-height:1.5}

.aiap-imgset-submit{margin-top:22px}

/* ============================================

   Provider Selection - タイル型UI

   (システムフォントのみ。外部リソースは使わない)

   ============================================ */

.aiap-provider-form{max-width:780px;margin:0 auto}

.aiap-provider-hero{margin:8px 0 20px;padding:0 4px}

.aiap-provider-hero-eyebrow{display:inline-block;font-size:11px;font-weight:700;letter-spacing:.18em;color:var(--txt-l);text-transform:uppercase;margin-bottom:10px}

.aiap-provider-hero-title{font-size:22px;line-height:1.4;font-weight:700;letter-spacing:-.005em;color:var(--txt);border:0;padding:0;margin:0}

/* .aiap-provider-hero-sub は img-hero-sub 群と集約済み (上記) */

.aiap-provider-section-label{font-size:11px;font-weight:700;letter-spacing:.14em;color:var(--txt-l);text-transform:uppercase;margin:18px 4px 10px}

/* よく使われる: 大きめタイル */

.aiap-provider-popular{display:grid;grid-template-columns:1fr;gap:10px;margin-bottom:8px}

.aiap-provider-tile{

    position:relative;background:var(--card);

    border:1.5px solid var(--bdr);border-radius:12px;

    padding:14px 16px;cursor:pointer;transition:transform .18s,box-shadow .18s,border-color .18s;

    display:flex;align-items:center;gap:12px;

    font-family:inherit;color:inherit;text-align:left;width:100%;

}

/* :hover / .is-selected は preset-card 群と集約済み (上記) */

.aiap-provider-tile:focus-visible{outline:2px solid var(--blue);outline-offset:2px}

.aiap-provider-tile-icon{flex-shrink:0}

.aiap-provider-tile-meta{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}

.aiap-provider-tile-name{font-size:14px;font-weight:700;color:var(--txt);line-height:1.3}

.aiap-provider-tile-sub{font-size:11px;color:var(--txt-m);line-height:1.4}

.aiap-provider-tile-status{

    display:inline-flex;align-items:center;gap:5px;

    font-size:11px;font-weight:600;color:var(--txt-l);flex-shrink:0;

}

.aiap-provider-tile-status::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--bdr)}

.aiap-provider-tile-status.is-configured{color:var(--green)}

.aiap-provider-tile-status.is-configured::before{background:var(--green)}

.aiap-provider-tile-check{

    width:22px;height:22px;border-radius:50%;background:var(--txt);color:#fff;

    display:none;align-items:center;justify-content:center;flex-shrink:0;

}

.aiap-provider-tile.is-selected .aiap-provider-tile-check{display:inline-flex}

.aiap-provider-tile.is-selected .aiap-provider-tile-status{display:none}

/* その他: コンパクトタイル */

.aiap-provider-other{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-bottom:8px}

.aiap-provider-tile-compact{

    position:relative;background:var(--card);

    border:1.5px solid var(--bdr);border-radius:10px;

    padding:10px 12px;cursor:pointer;transition:border-color .15s,box-shadow .15s;

    display:flex;align-items:center;gap:9px;

    font-family:inherit;color:inherit;text-align:left;width:100%;

}

.aiap-provider-tile-compact:hover{border-color:var(--txt-l);box-shadow:var(--shadow-sm)}

.aiap-provider-tile-compact.is-selected{border-color:var(--txt);box-shadow:var(--shadow-md),0 0 0 3px rgba(29,35,39,.04)}

.aiap-provider-tile-compact:focus-visible{outline:2px solid var(--blue);outline-offset:2px}

.aiap-provider-tile-compact .aiap-provider-tile-icon{width:30px;height:30px;font-size:12px;border-radius:6px;flex-shrink:0}

.aiap-provider-tile-compact .aiap-provider-tile-name{flex:1;min-width:0;font-size:12px;font-weight:600;color:var(--txt);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.aiap-provider-tile-compact .aiap-provider-tile-status{font-size:0;width:7px;height:7px;border-radius:50%;background:var(--bdr);padding:0;margin-left:auto;flex-shrink:0}

.aiap-provider-tile-compact .aiap-provider-tile-status::before{display:none}

.aiap-provider-tile-compact .aiap-provider-tile-status.is-configured{background:var(--green)}

.aiap-provider-tile-compact.is-selected .aiap-provider-tile-status{display:none}

.aiap-provider-tile-compact .aiap-provider-tile-check{width:18px;height:18px;margin-left:auto}

.aiap-provider-tile-compact .aiap-provider-tile-check svg{width:11px;height:11px}

/* 設定パネル (選択中プロバイダのみ) */

.aiap-provider-panel{

    background:var(--card);border:1.5px solid var(--bdr);border-radius:12px;

    margin-top:18px;overflow:hidden;padding:0;

}

.aiap-provider-panel:not([hidden]){animation:aiap-slidedown .35s cubic-bezier(.2,.8,.2,1)}

.aiap-provider-panel-header{

    display:flex;align-items:center;gap:12px;

    padding:14px 18px;border-bottom:1px solid var(--bdr-l);

    background:linear-gradient(180deg,#fafafa,transparent);

}

.aiap-provider-panel-icon{flex-shrink:0}

.aiap-provider-panel-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}

.aiap-provider-panel-title{font-size:14px;font-weight:700;color:var(--txt);line-height:1.3}

.aiap-provider-panel-sub{font-size:11px;color:var(--txt-m)}

.aiap-provider-panel-active{

    display:inline-flex;align-items:center;gap:5px;

    padding:3px 9px;border-radius:999px;background:var(--green-bg);color:var(--green);

    font-size:10px;font-weight:700;letter-spacing:.04em;flex-shrink:0;

}

.aiap-provider-panel-active::before{content:"";width:5px;height:5px;border-radius:50%;background:var(--green)}

.aiap-provider-panel-body{padding:16px 18px 18px}

.aiap-provider-panel .aiap-btn-primary{background:var(--txt);color:#fff;border-color:var(--txt)}

.aiap-provider-panel .aiap-btn-primary:hover{background:#000;border-color:#000}

/* 既存のグラデセレクター .aiap-provider-picker は新UIで使わないので非表示 */

.aiap-provider-form .aiap-provider-picker{display:none}

/* ============================================

   Top Tab Navigation

   ============================================ */

.aiap-page-head{padding:14px 0 8px;border-bottom:0}

.aiap-page-head h1{font-size:18px;font-weight:700;letter-spacing:-.01em;color:var(--txt);margin:0 0 4px}

.aiap-tabs{

    display:flex;gap:0;

    border-bottom:1px solid var(--bdr);

    margin:0 0 24px;padding:0;

    overflow-x:auto;-webkit-overflow-scrolling:touch;

    scrollbar-width:none;

}

.aiap-tabs::-webkit-scrollbar{display:none}

.aiap-tab{

    display:inline-flex;align-items:center;gap:6px;

    padding:11px 14px;

    font-size:13px;font-weight:500;color:var(--txt-m);

    text-decoration:none;

    border-bottom:2px solid transparent;

    transition:color .15s,border-color .15s;

    flex-shrink:0;white-space:nowrap;

    box-shadow:none;

}

.aiap-tab:hover{color:var(--txt)}

.aiap-tab.is-active{color:var(--txt);border-bottom-color:var(--txt);font-weight:600}

.aiap-tab:focus{box-shadow:none;outline:none}

.aiap-tab:focus-visible{outline:2px solid var(--blue);outline-offset:2px;border-radius:4px}

.aiap-tab .aiap-tab-icon{font-size:15px;width:15px;height:15px;line-height:1}

.aiap-tab-panel{padding:0}

/* ============================================

   Plan Card v2

   ============================================ */

.aiap-plan-card-v2{

    background:var(--card);border:1.5px solid var(--bdr);border-radius:12px;

    padding:16px 18px;margin:0 0 18px;

}

.aiap-plan-card-v2-pro{border-color:#1d8348;background:linear-gradient(180deg,#edfaef,transparent 40%)}

.aiap-plan-card-v2-trial{border-color:#92400e;background:linear-gradient(180deg,#fef3c7,transparent 40%)}

.aiap-plan-card-v2-row{display:flex;align-items:center;gap:14px;flex-wrap:wrap}

.aiap-plan-card-v2-name{display:flex;align-items:center;gap:8px;flex-shrink:0}

.aiap-plan-card-v2-label{font-size:14px;font-weight:700;color:var(--txt)}

.aiap-plan-card-v2-badge{

    font-size:10px;font-weight:800;letter-spacing:.06em;

    padding:2px 8px;border-radius:999px;background:var(--txt);color:#fff;

}

.aiap-plan-card-v2-badge-pro{background:#1d8348}

.aiap-plan-card-v2-badge-trial{background:#92400e}

.aiap-plan-card-v2-info{flex:1;min-width:0;display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}

.aiap-plan-card-v2-stat{font-size:13px;color:var(--txt-m)}

.aiap-plan-card-v2-stat strong{font-size:18px;font-weight:700;color:var(--txt);margin-right:2px}

.aiap-plan-card-v2-stat-sep{color:var(--txt-l);margin:0 2px}

.aiap-plan-card-v2-stat-limit{color:var(--txt-m)}

.aiap-plan-card-v2-stat-unit{margin-left:6px;color:var(--txt-l);font-size:12px}

.aiap-plan-card-v2-cta{

    display:inline-flex;align-items:center;gap:5px;

    padding:7px 14px;background:#1d2327;color:#fff;border-radius:6px;

    font-size:12px;font-weight:600;text-decoration:none;flex-shrink:0;

    transition:background .15s;

}

.aiap-plan-card-v2-cta:hover{background:#000;color:#fff}

.aiap-plan-card-v2-cta .dashicons{font-size:14px;width:14px;height:14px}

.aiap-plan-card-v2-bar{height:5px;background:var(--bdr-l);border-radius:999px;margin-top:12px;overflow:hidden}

.aiap-plan-card-v2-bar-fill{height:100%;width:var(--aiap-bar-pct,0%);background:var(--green);border-radius:999px;transition:width .3s}

.aiap-plan-card-v2-bar-fill.aiap-usage-fill-warn{background:#f59e0b}

.aiap-plan-card-v2-bar-fill.aiap-usage-fill-full{background:var(--red)}

.aiap-plan-card-v2-warning{font-size:12px;color:#92400e;margin:8px 0 0}

/* ============================================

   Section (cards used by settings/prompts/logs)

   ============================================ */

.aiap-section{

    background:var(--card);border:1.5px solid var(--bdr);border-radius:12px;

    margin:0 0 18px;overflow:hidden;

}

.aiap-section-header{padding:14px 18px 0}

.aiap-section-header:last-child{padding-bottom:14px}

.aiap-section-title-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}

.aiap-section-title{font-size:14px;font-weight:700;color:var(--txt);margin:0;border:0;padding:0;line-height:1.3}

.aiap-section-sub{font-size:12px;color:var(--txt-m);margin:4px 0 0;line-height:1.5}

.aiap-section-count{

    font-size:11px;font-weight:700;color:var(--txt-m);

    background:var(--bdr-l);padding:2px 8px;border-radius:999px;

}

.aiap-section-cta{font-size:12px;color:var(--blue);text-decoration:none;font-weight:600;margin-left:auto}

.aiap-section-cta:hover{text-decoration:underline}

.aiap-section-action{margin-left:auto}

.aiap-section-body{padding:14px 18px 18px}

.aiap-section-body-flush{padding:0}

.aiap-section-locked{opacity:.55;pointer-events:none}

.aiap-section-pro{position:relative}

/* ============================================

   Quick Post (editor)

   ============================================ */

.aiap-quickpost{max-width:780px;margin:0 auto}

.aiap-quickpost-form{background:var(--card);border:1.5px solid var(--bdr);border-radius:14px;padding:18px;margin-bottom:18px}

.aiap-quickpost-options{display:grid;grid-template-columns:1fr;gap:14px;margin-bottom:18px;padding-top:14px;border-top:1px solid var(--bdr-l)}

.aiap-quickpost-action{display:flex;justify-content:flex-end}

/* ============================================

   Task list (prompts)

   ============================================ */

.aiap-task-list{display:flex;flex-direction:column;gap:8px}

.aiap-task-card{

    background:#fff;border:1px solid var(--bdr);border-radius:10px;

    padding:0;overflow:hidden;transition:border-color .15s;

}

.aiap-task-card:hover{border-color:var(--txt-l)}

.aiap-task-card.is-disabled{opacity:.7;background:#fafafa}

.aiap-task-card-row{display:flex;align-items:flex-start;gap:12px;padding:12px 14px}

.aiap-task-status{

    width:8px;height:8px;border-radius:50%;background:var(--bdr);flex-shrink:0;margin-top:6px;

}

.aiap-task-status.is-on{background:var(--green);box-shadow:0 0 0 3px rgba(16,185,129,.15)}

.aiap-task-card-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}

.aiap-task-card-state{font-size:10px;font-weight:700;letter-spacing:.08em;color:var(--txt-l);text-transform:uppercase}

.aiap-task-card.is-enabled .aiap-task-card-state{color:var(--green)}

.aiap-task-card-prompt{font-size:13px;color:var(--txt);line-height:1.5;font-weight:500;word-break:normal;overflow-wrap:break-word}

.aiap-task-card-meta{font-size:11px;color:var(--txt-l);display:flex;gap:8px;flex-wrap:wrap;margin-top:2px}

.aiap-task-card-actions{display:flex;gap:4px;flex-shrink:0}

.aiap-task-edit{padding:0 14px}

.aiap-task-edit[open]{padding:14px;border-top:1px solid var(--bdr-l);background:#fafafa}

.aiap-task-edit-form .aiap-field{margin-bottom:14px}

.aiap-task-edit-form .aiap-field:last-child{margin-bottom:0}

.aiap-task-edit-action{display:flex;gap:8px;justify-content:flex-end;margin-top:14px}

/* ============================================

   Log list

   ============================================ */

.aiap-log-list{list-style:none;margin:0;padding:0}

.aiap-log-item{

    display:flex;gap:12px;padding:14px 18px;

    border-bottom:1px solid var(--bdr-l);

}

.aiap-log-item:last-child{border-bottom:0}

.aiap-log-dot{

    width:8px;height:8px;border-radius:50%;flex-shrink:0;margin-top:6px;

    background:var(--txt-l);

}

.aiap-log-dot-success{background:var(--green);box-shadow:0 0 0 3px rgba(16,185,129,.15)}

.aiap-log-dot-error{background:var(--red);box-shadow:0 0 0 3px rgba(214,54,56,.15)}

.aiap-log-dot-warning,.aiap-log-dot-warn{background:#f59e0b;box-shadow:0 0 0 3px rgba(245,158,11,.15)}

.aiap-log-dot-info{background:var(--blue)}

.aiap-log-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}

.aiap-log-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap}

.aiap-log-status-text{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--txt-m)}

.aiap-log-item-success .aiap-log-status-text{color:var(--green)}

.aiap-log-item-error .aiap-log-status-text{color:var(--red)}

.aiap-log-item-warning .aiap-log-status-text,.aiap-log-item-warn .aiap-log-status-text{color:#92400e}

.aiap-log-time{font-size:11px;color:var(--txt-l);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}

.aiap-log-message{font-size:13px;color:var(--txt);margin:0;line-height:1.5;word-break:normal;overflow-wrap:break-word}

/* ============================================

   Hide legacy provider picker globally

   ============================================ */

.aiap-provider-picker{display:none}

/* ============================================

   Settings form max-width

   ============================================ */

.aiap-settings-form,.aiap-prompts-form,.aiap-quickpost{max-width:780px;margin:0 auto}

/* FAQ submenu */

.aiap-faq-wrap .aiap-card h2{margin-bottom:12px}

.aiap-faq-list{display:grid;gap:8px}

.aiap-faq-item{border:1px solid var(--bdr);border-radius:10px;background:#fff;overflow:hidden}

.aiap-faq-item summary{cursor:pointer;font-weight:600;padding:12px 14px;line-height:1.5}

.aiap-faq-item summary:hover{background:#f8fafc}

.aiap-faq-item p{margin:0;padding:0 14px 14px;color:var(--txt-m);line-height:1.7;white-space:normal}

/* Terms of Use submenu - consent warning */

.aiap-terms-consent{margin:0 0 16px;padding:16px 18px;background:#fef2f2;border:2px solid #ef4444;border-left-width:6px;border-radius:8px;color:#7f1d1d;line-height:1.7}

.aiap-terms-consent h2{margin:0 0 8px;font-size:16px;color:#991b1b;display:flex;align-items:center;gap:6px}

.aiap-terms-consent h2::before{content:"⚠";font-size:20px}

.aiap-terms-consent p{margin:0 0 6px;font-size:14px}

.aiap-terms-consent strong{color:#7f1d1d;font-weight:700}

.aiap-terms-consent p:last-child{margin-bottom:0}

/* FAQ / Terms 等の本文末尾に置く「最終更新日」テキスト (静的インライン style から CSS 化) */

.aiap-doc-updated-at{margin-top:6px;opacity:.7}

/* ============================================================

   Generated history: pagination control UX

   ------------------------------------------------------------

   レイアウト: [bulkactions(=非表示)] [範囲インジケータ] [ページ送り]

   - desktop: space-between で範囲表示=左 / ページ送り=右

   - mobile : 縦に積んで中央寄せ。first/last ボタンは隠す。

   ============================================================ */

.aiap-logs-table-section .tablenav{

  margin:0;

  padding:10px 16px;

  height:auto;

  min-height:0;

  display:flex;

  flex-wrap:wrap;

  align-items:center;

  justify-content:space-between;

  gap:10px 16px;

  background:#fff;

  border-bottom:1px solid var(--bdr, #e5e7eb);

  box-sizing:border-box;

}

.aiap-logs-table-section .tablenav.bottom{

  border-top:1px solid var(--bdr, #e5e7eb);

  border-bottom:0;

}

/* バルクアクションは現状 UI 上は使っていないため非表示 */

.aiap-logs-table-section .tablenav .alignleft.actions{display:none}

/* 範囲インジケータ ("Showing 21–40 of 150") */

.aiap-logs-table-section .aiap-tablenav-info{

  flex:1 1 auto;

  min-width:0;

  margin:0;

  font-size:13px;

  color:var(--txt-m, #52525b);

  font-variant-numeric:tabular-nums;

  white-space:nowrap;

  overflow:hidden;

  text-overflow:ellipsis;

}

/* WP 標準の "150 items" は範囲インジケータと役割が重複するので隠す */

.aiap-logs-table-section .tablenav-pages .displaying-num{display:none}

/* ページ送りブロック全体 */

.aiap-logs-table-section .tablenav .tablenav-pages{

  flex:0 0 auto;

  float:none;

  display:inline-flex;

  align-items:center;

  gap:6px;

  margin:0;

  color:var(--txt-m, #52525b);

}

.aiap-logs-table-section .tablenav-pages .pagination-links{

  display:inline-flex;

  align-items:center;

  gap:4px;

}

/* ページ送りボタン (first/prev/next/last) と無効状態の span */

.aiap-logs-table-section .tablenav-pages .button,

.aiap-logs-table-section .tablenav-pages .tablenav-pages-navspan{

  min-width:34px;

  width:34px;

  height:34px;

  padding:0;

  display:inline-flex;

  align-items:center;

  justify-content:center;

  border-radius:8px;

  box-sizing:border-box;

  line-height:1;

  font-size:18px;

  font-weight:500;

  background:#fff;

  color:var(--txt, #18181b);

  border:1px solid var(--bdr, #e4e4e7);

  box-shadow:0 1px 2px rgb(0 0 0 / 0.04);

  transition:background-color .12s ease, border-color .12s ease, box-shadow .12s ease, color .12s ease;

}

/* «(最初) / »(最後) は ‹ › と字形が紛らわしいので、有効時に

   背景を薄く / 字を大きく入れて「端ジャンプ」だと一目で分かるようにする。 */

.aiap-logs-table-section .tablenav-pages a.first-page.button,

.aiap-logs-table-section .tablenav-pages a.last-page.button{

  background:var(--bg-soft, #f9fafb);

  font-size:20px;

}

.aiap-logs-table-section .tablenav-pages a.button:hover{

  background:var(--bg-hover, #f4f4f5);

  border-color:var(--txt-l, #a1a1aa);

  color:var(--txt, #18181b);

}

.aiap-logs-table-section .tablenav-pages a.button:focus-visible{

  outline:2px solid var(--blue, #2563eb);

  outline-offset:2px;

  border-color:var(--blue, #2563eb);

}

/* 無効状態 (1ページ目で « ‹ / 最終ページで › » が span として描画される) */

.aiap-logs-table-section .tablenav-pages .tablenav-pages-navspan{

  color:var(--txt-l, #a1a1aa);

  border-color:var(--bdr-l, #f4f4f5);

  background:var(--bg-soft, #f9fafb);

  box-shadow:none;

  cursor:not-allowed;

}

/* ページ番号入力 (current-page) と "/ N" 表示 */

.aiap-logs-table-section .tablenav-pages .paging-input{

  display:inline-flex;

  align-items:center;

  gap:6px;

  margin:0 4px;

  font-size:13px;

  font-variant-numeric:tabular-nums;

}

.aiap-logs-table-section .tablenav-pages .current-page{

  width:48px;

  min-width:48px;

  height:34px;

  padding:0 6px;

  margin:0;

  text-align:center;

  border-radius:8px;

  border:1px solid var(--bdr, #e4e4e7);

  background:#fff;

  font-weight:600;

  font-size:14px;

  font-variant-numeric:tabular-nums;

  color:var(--txt, #18181b);

  box-sizing:border-box;

  box-shadow:0 1px 2px rgb(0 0 0 / 0.04);

  transition:border-color .12s ease, box-shadow .12s ease;

}

.aiap-logs-table-section .tablenav-pages .current-page:focus{

  border-color:var(--blue, #2563eb);

  box-shadow:0 0 0 3px rgb(37 99 235 / 0.18);

  outline:none;

}

.aiap-logs-table-section .tablenav-paging-text{

  display:inline-flex;

  align-items:center;

  gap:4px;

  white-space:nowrap;

  margin:0;

  font-size:13px;

  color:var(--txt-m, #52525b);

}

.aiap-logs-table-section .tablenav-paging-text .total-pages{

  font-weight:600;

  color:var(--txt, #18181b);

}

/* ============================================================

   投稿履歴テーブル: レスポンシブ列幅調整

   - 共通ブレークポイントは 768 / 992 / 1200 / 1400 を使用

   - WordPress 管理画面のカード化だけ 782px を例外として使用

   - 操作ボタンは必ず表示し、画像列と重ねない

   ------------------------------------------------------------

   詳細度メモ:

     `.aiap-logs-table-section table.wp-list-table.aiap-generated-posts` = (0,3,1)

     これにより WP コアの最も詳細な `.wp-list-table.fixed .column-X` (0,3,0) に

     詳細度で勝てるため、!important を付けずに上書きできる。

   ============================================================ */

.aiap-logs-table-section table.wp-list-table.aiap-generated-posts{

  width:100%;

  max-width:100%;

  min-width:0;

  table-layout:fixed;

  border-collapse:collapse;

}

.aiap-logs-table-section,

.aiap-logs-table-section .aiap-section-body,

.aiap-logs-table-section .wp-list-table{

  max-width:100%;

  overflow-x:hidden;

  box-sizing:border-box;

}

.aiap-logs-table-section table.wp-list-table.aiap-generated-posts th,

.aiap-logs-table-section table.wp-list-table.aiap-generated-posts td{

  box-sizing:border-box;

  min-width:0;

  overflow:hidden;

  text-overflow:ellipsis;

  vertical-align:middle;

}

.aiap-logs-table-section table.wp-list-table.aiap-generated-posts .check-column{width:38px; padding-left:14px; padding-right:6px;}

.aiap-logs-table-section table.wp-list-table.aiap-generated-posts .column-title{width:29%;}

.aiap-logs-table-section table.wp-list-table.aiap-generated-posts .column-created_at{width:16%; white-space:nowrap;}

.aiap-logs-table-section table.wp-list-table.aiap-generated-posts .column-writer{width:9%; white-space:nowrap;}

.aiap-logs-table-section table.wp-list-table.aiap-generated-posts .column-task_name{width:13%; white-space:nowrap;}

.aiap-logs-table-section table.wp-list-table.aiap-generated-posts .column-status{width:8%; white-space:nowrap;}

.aiap-logs-table-section table.wp-list-table.aiap-generated-posts .column-image{

  width:64px;

  min-width:64px;

  max-width:64px;

  padding-left:4px;

  padding-right:4px;

  text-align:center;

  overflow:hidden;

}

.aiap-logs-table-section table.wp-list-table.aiap-generated-posts .column-actions{

  width:140px;

  min-width:140px;

  max-width:140px;

  padding-left:4px;

  padding-right:8px;

  text-align:right;

  overflow:hidden;

}

.aiap-logs-table-section table.wp-list-table.aiap-generated-posts td.column-title a{

  display:-webkit-box;

  -webkit-line-clamp:2;

  -webkit-box-orient:vertical;

  overflow:hidden;

  white-space:normal;

  word-break:break-word;

  line-height:1.35;

}

.aiap-logs-table-section table.wp-list-table.aiap-generated-posts td.column-task_name,

.aiap-logs-table-section table.wp-list-table.aiap-generated-posts td.column-status{

  overflow:hidden;

  text-overflow:ellipsis;

}

.aiap-logs-table-section table.wp-list-table.aiap-generated-posts .aiap-logs-thumb{

  display:block;

  width:54px;

  max-width:100%;

  height:54px;

  object-fit:cover;

  margin-left:auto;

  margin-right:auto;

  border-radius:6px;

}

.aiap-logs-table-section table.wp-list-table.aiap-generated-posts .aiap-action-buttons{

  display:flex;

  align-items:center;

  justify-content:flex-end;

  gap:6px;

  flex-wrap:nowrap;

  width:100%;

  max-width:100%;

  overflow:hidden;

}

.aiap-logs-table-section table.wp-list-table.aiap-generated-posts .aiap-action-buttons .button-small{

  display:inline-flex;

  align-items:center;

  justify-content:center;

  flex:0 0 auto;

  box-sizing:border-box;

  margin:0;

  white-space:nowrap;

}

.aiap-logs-table-section table.wp-list-table.aiap-generated-posts .aiap-action-buttons .dashicons{

  width:16px;

  height:16px;

  font-size:16px;

  line-height:16px;

}

/* ============================================================

   RSS Feeds tab & task card RSS section

   ============================================================ */

.aiap-rss-tab .description {

    margin-bottom: 1em;

}

.aiap-rss-feed-form {

    margin-bottom: 2em;

    padding: 1em;

    background: #fbfbfb;

    border: 1px solid #e2e4e7;

    border-radius: 4px;

}

/* 「フィードを追加」カード */

.aiap-rss-add-card {

    margin: 0 0 12px;

    padding: 16px 18px;

    background: #fff;

    border: 1px solid var(--bdr, #e2e4e7);

    border-radius: 10px;

    box-shadow: 0 1px 2px rgba(15,23,42,.04);

}

.aiap-rss-feed-form { margin: 0; }

.aiap-rss-add-grid {

    display: grid;

    grid-template-columns: 1fr 1.4fr;

    gap: 12px 16px;

    margin-bottom: 14px;

}

.aiap-rss-add-field { display: flex; flex-direction: column; gap: 6px; }

.aiap-rss-add-label {

    font-size: 12px;

    font-weight: 600;

    color: var(--txt-m, #555);

    letter-spacing: .02em;

}

.aiap-rss-add-row {

    display: flex;

    align-items: center;

    gap: 12px;

    flex-wrap: wrap;

    padding-top: 4px;

}

.aiap-rss-add-toggle {

    display: inline-flex;

    align-items: center;

    gap: 6px;

    font-size: 13px;

    color: var(--txt-m, #555);

}

.aiap-rss-add-actions {

    margin-left: auto;

    display: flex;

    gap: 8px;

    align-items: center;

}

.aiap-rss-test-result {

    display: block;

    margin-top: 10px;

    font-size: 12px;

    font-style: italic;

}

.aiap-rss-test-result.is-success { color: #1d6b3d; }

.aiap-rss-test-result.is-error   { color: #c92e2e; }

/* 「登録済みフィード」一覧 */

.aiap-rss-empty-state {

    margin: 8px 0 20px;

    padding: 24px;

    text-align: center;

    color: var(--txt-l, #888);

    font-size: 13px;

    background: #fafafa;

    border: 1px dashed var(--bdr, #e2e4e7);

    border-radius: 10px;

}

.aiap-rss-feed-list {

    display: flex;

    flex-direction: column;

    gap: 10px;

}

/* フィードカード */

.aiap-rss-feed-card {

    margin: 0;

    padding: 14px 16px;

    background: #fff;

    border: 1px solid var(--bdr, #e2e4e7);

    border-radius: 10px;

    box-shadow: 0 1px 2px rgba(15,23,42,.04);

    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;

}

.aiap-rss-feed-card:hover {

    border-color: var(--txt-l, #c0c0c0);

    box-shadow: 0 4px 16px -4px rgba(15,23,42,.08);

}

.aiap-rss-feed-card.is-disabled { opacity: 0.6; }

.aiap-rss-feed-card-head {

    display: flex;

    align-items: center;

    gap: 12px;

    margin: 0 0 12px;

    padding: 0 0 12px;

    border-bottom: 1px solid #f0f0f0;

}

.aiap-rss-feed-icon {

    flex-shrink: 0;

    width: 32px;

    height: 32px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    border-radius: 8px;

    background: #fff7ec;

    color: #e8851e;

    font-size: 18px;

}

.aiap-rss-feed-titlebox {

    flex: 1;

    min-width: 0;

    display: flex;

    flex-direction: column;

    gap: 2px;

}

.aiap-rss-feed-name {

    font-size: 14px;

    font-weight: 700;

    color: var(--txt, #222);

    line-height: 1.3;

}

.aiap-rss-feed-url {

    font-size: 11px;

    color: var(--txt-m, #777);

    line-height: 1.4;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

}

.aiap-rss-feed-toggle {

    display: inline-flex;

    align-items: center;

    gap: 6px;

    font-weight: 500;

    font-size: 12px;

    color: var(--txt-m, #555);

    white-space: nowrap;

}

/* メタ情報（最終取得・使用済み・直近エラー） */

.aiap-rss-feed-meta {

    display: flex;

    flex-wrap: wrap;

    gap: 18px;

    margin: 0 0 12px;

    padding: 6px 0;

    font-size: 12px;

}

.aiap-rss-feed-meta-item {

    display: inline-flex;

    flex-direction: column;

    gap: 2px;

    min-width: 0;

}

.aiap-rss-feed-meta-label {

    font-size: 10px;

    font-weight: 700;

    letter-spacing: .1em;

    text-transform: uppercase;

    color: var(--txt-l, #999);

}

.aiap-rss-feed-meta-value {

    font-size: 12px;

    color: var(--txt, #333);

    font-feature-settings: "tnum" 1;

}

.aiap-rss-feed-meta-item-error .aiap-rss-feed-meta-label,

.aiap-rss-feed-meta-item-error .aiap-rss-feed-meta-value {

    color: #c92e2e;

}

/* アクションボタン群 */

.aiap-rss-feed-actions {

    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    align-items: center;

}

.aiap-rss-inline-form { display: inline; margin: 0; }

/* 編集モード切替：is-editing が付くと閲覧用ビューを隠して編集フォームを表示 */

.aiap-rss-feed-edit-form { display: none; margin: 0; }

.aiap-rss-feed-card.is-editing > .aiap-rss-feed-card-head,

.aiap-rss-feed-card.is-editing > .aiap-rss-feed-card-body { display: none; }

.aiap-rss-feed-card.is-editing > .aiap-rss-feed-edit-form { display: block; }

.aiap-task-rss-feed {

    display: inline-block;

    margin-right: 1em;

}

.aiap-task-rss-detail[hidden] {

    display: none;

}

.aiap-task-rss-empty {

    color: #c92e2e;

    font-style: italic;

}

/* セクションコンテナ */

.aiap-task-section {

    margin: 0 0 8px;

    background: #fbfbfb;

    border: 1px solid #e2e4e7;

    border-radius: 4px;

    overflow: hidden;

}

.aiap-task-section summary::-webkit-details-marker { display: none; }

.aiap-task-section summary::marker { content: ''; }

/* ヘッダ */

.aiap-task-section__summary {

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 10px 14px;

    cursor: pointer;

    user-select: none;

    list-style: none;

    transition: background-color 0.15s;

}

.aiap-task-section__summary:hover {

    background: #f0f0f0;

}

.aiap-task-section[open] > .aiap-task-section__summary {

    background: #f5f5f5;

    border-bottom: 1px solid #e2e4e7;

}

/* 三角アイコン回転 */

.aiap-task-section__toggle .dashicons {

    transition: transform 0.15s ease;

    color: #666;

}

.aiap-task-section[open] > .aiap-task-section__summary .aiap-task-section__toggle .dashicons {

    transform: rotate(90deg);

}

/* セクション識別アイコン・タイトル・サマリ */

.aiap-task-section__icon {

    color: #555;

    font-size: 18px;

}

.aiap-task-section__title {

    font-weight: 600;

    color: #333;

}

.aiap-task-section__configured-badge {

    display: inline-block;

    padding: 1px 8px;

    font-size: 0.75em;

    font-weight: 600;

    color: #1d6b3d;

    background: #d4edda;

    border: 1px solid #b1d8bb;

    border-radius: 10px;

    line-height: 1.6;

    white-space: nowrap;

}

.aiap-task-section__summary-text {

    flex: 1;

    font-size: 0.9em;

    color: #888;

    font-weight: normal;

}

/* セクション本体 */

.aiap-task-section__body {

    padding: 12px 14px 14px;

}

/* フォーカスリング */

.aiap-task-section__summary:focus {

    outline: none;

}

.aiap-task-section__summary:focus-visible {

    outline: 2px solid #2271b1;

    outline-offset: -2px;

}

/* 余白 */

.aiap-task-section-group {

    margin-top: 16px;

}

.aiap-task-section-group .aiap-task-section:first-child {

    margin-top: 0;

}

