/* =====================================================================
 * マイページ（/siteb/password）の「Google・LINE でログイン」（CH-722）
 * - 共通の部品 element Parts/external_login_links を 'siteb' => true で出したときだけの形。上の「パスワード」と同じ白い札（sb-card sb-section）
 * - 表をやめて、サービスごとに縦に並べる（サービス名と札・メール・つないだ日時・外す／外せない理由）。横のスクロールを出さない
 * ===================================================================== */
.sb-page-new .sb-ext-logins {
    gap: 16px;
}

.sb-page-new .sb-ext-logins .sb-section-title,
.sb-page-new .sb-password-title {
    text-transform: none;
    letter-spacing: normal;
}

/* 「今のパスワード」の下の「再設定のリンクを送る」（CH-892）。字とボタンが狭い画面では折り返す */
.sb-page-new .sb-reset-link {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin-top: 6px;
}

/* 「パスワードを決める」の上の 1 行（CH-892）と、いちばん下の「ログインのメールアドレスを変えたいとき」（#10386） */
.sb-page-new .sb-password-unset-note,
.sb-page-new .sb-login-email-note {
    margin-top: 4px;
}

.sb-ext-login-list {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sb-ext-login {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 16px 0;
    border-top: 1px solid var(--sb-line-soft);
}

.sb-ext-login:first-child {
    padding-top: 0;
    border-top: 0;
}

.sb-ext-login:last-child {
    padding-bottom: 0;
}

.sb-ext-login-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.sb-ext-login-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--sb-text);
}

.sb-ext-login-account {
    color: var(--sb-text);
    overflow-wrap: anywhere;
}

.sb-ext-login-note {
    font-size: 13px;
    color: var(--sb-text-muted);
}

.sb-ext-login-reason {
    margin-top: 6px;
    font-size: 14px;
    color: var(--sb-text-sub);
}

.sb-ext-login-action {
    margin-top: 8px;
}

.sb-ext-login-action form {
    margin: 0;
}

/* --- サイトの詳細の「ファイルの確かめ」の行：本体の道（最大 10）・プラグインの道（最大 50）（CH-812） --- */
.sb-integrity-paths {
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    font-family: var(--sb-mono);
    font-size: 12px;
    overflow-wrap: anywhere;
}

/* =====================================================================
 * 退会（/siteb/users/withdraw・CH-877 の段 1）
 * - plugins/SitebPlus/templates/Users/withdraw.php だけの形。白い札（sb-card sb-section）の中の箇条書き・アカウントの表・止めるときの文
 * ===================================================================== */
.sb-withdraw-list {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--sb-text-sub);
}

.sb-withdraw-account {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 6px 16px;
    margin: 0;
    padding-top: 16px;
    border-top: 1px solid var(--sb-line-soft);
    font-size: 14px;
}

.sb-withdraw-account dt {
    color: var(--sb-text-muted);
}

.sb-withdraw-account dd {
    margin: 0;
    color: var(--sb-text);
    overflow-wrap: anywhere;
}

.sb-withdraw-blocked {
    border-color: var(--sb-danger);
    background: var(--sb-danger-soft);
}

.sb-withdraw-blocked-text {
    margin: 0;
    font-weight: 700;
    color: var(--sb-danger);
}

.sb-withdraw-contact {
    margin-top: 16px;
}

/* やめる理由（任意・CH-1035 の段 1・templates/element/Users/withdraw_feedback.php）。PC は 2 列、スマホは 1 列 */
.sb-withdraw-feedback {
    padding-top: 20px;
    border-top: 1px solid var(--sb-line-soft);
}

.sb-withdraw-feedback .sb-help {
    margin: 0;
}

.sb-withdraw-reasons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
    max-width: 760px;
}

.sb-withdraw-reasons .sb-check {
    align-items: flex-start;
    padding: 9px 0;
    min-height: 40px;
    line-height: 1.5;
}

.sb-page-new .sb-withdraw-reasons .sb-check input[type="checkbox"] {
    margin-top: 2px;
}

.sb-page-new .sb-textarea.sb-withdraw-comment {
    min-height: 110px;
}

@media (max-width: 760px) {
    .sb-withdraw-reasons {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* =====================================================================
 * サイトの詳細の「監視の設定」：大分類のアコーディオン（CH-857 #10253 の A）
 * - plugins/SitebPlus/templates/SiteMonitors/view.php の details.sb-cat（同じ name で同時に 1 つだけ開く）と element/site_view/*.php
 * - 閉じた見出しの右：要確認の札（sb-badge-caution・赤は sb-badge-danger）か、短い今の状態（sb-cat-now・灰色）
 * ===================================================================== */
.sb-cat-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--sb-line-soft);
}

.sb-cat {
    border-bottom: 1px solid var(--sb-line-soft);
}

.sb-cat:last-child {
    border-bottom: 0;
}

.sb-cat-head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 12px 0;
    list-style: none;
    cursor: pointer;
}

.sb-cat-head::-webkit-details-marker {
    display: none;
}

.sb-cat-head::after {
    content: "";
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    margin: 0 4px 0 2px;
    border-right: 2px solid var(--sb-text-sub);
    border-bottom: 2px solid var(--sb-text-sub);
    transform: rotate(45deg);
    transition: transform .15s;
}

.sb-cat[open] > .sb-cat-head::after {
    transform: rotate(-135deg);
}

.sb-cat-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--sb-text);
}

.sb-cat-head > .sb-badge {
    flex: 0 0 auto;
}

.sb-cat-now {
    flex: 0 1 auto;
    min-width: 0;
    font-size: 13px;
    color: var(--sb-text-muted);
    text-align: right;
}

.sb-cat-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 0 22px;
}

.sb-cat-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sb-cat-body .sb-form {
    gap: 12px;
}

/* サイトが 0 件のときの「はじめての方へ」（見本のカード・始め方の 3 つ・CH-1010・element/first_steps.php） */
.sb-first {
    padding: 22px 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sb-first-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.sb-first-sample {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.sb-first-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 18px;
    border: 1px dashed var(--sb-line);
    border-radius: 12px;
    background: var(--sb-bg);
    color: var(--sb-text) !important;
    text-decoration: none;
}

.sb-first-card.is-link:hover,
.sb-first-card.is-link:focus-visible {
    border-color: var(--sb-accent);
}

.sb-first-label {
    position: absolute;
    top: 12px;
    right: 12px;
}

.sb-first-card-site {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding-right: 56px;
}

.sb-first-card-nums {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 0;
}

.sb-first-card-nums div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sb-first-card-nums dt {
    font-size: 12px;
    color: var(--sb-text-muted);
}

.sb-first-card-nums dd {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.sb-first-card-more {
    font-size: 12px;
    color: var(--sb-accent);
}

.sb-first-note {
    font-size: 12px;
    color: var(--sb-text-muted);
}

.sb-first-how {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.sb-first-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sb-first-steps li {
    display: flex;
    gap: 12px;
    font-size: 14px;
    color: var(--sb-text-sub);
}

.sb-first-steps strong {
    display: block;
    font-size: 15px;
    color: var(--sb-text);
}

.sb-first-num {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--sb-accent);
    background: var(--sb-accent-soft);
}

.sb-first-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
}

@media (max-width: 760px) {
    .sb-first {
        padding: 18px 16px 20px;
    }

    .sb-first-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }
}

/* サイトの詳細の「WordPress のサイトのようです」の案内の帯（CH-1010・siteb-wp-hint.js が「×」で隠す） */
.sb-wp-hint {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px 14px 18px;
    border-color: #A9D3D6;
    background: var(--sb-accent-soft);
}

.sb-wp-hint[hidden] {
    display: none;
}

.sb-wp-hint-icon {
    flex: 0 0 auto;
    margin-top: 2px;
    color: var(--sb-accent);
}

.sb-wp-hint-text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
    color: var(--sb-text-sub);
}

.sb-wp-hint-text strong {
    color: var(--sb-text);
}

.sb-wp-hint-link {
    white-space: nowrap;
}

.sb-wp-hint-close {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--sb-text-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.sb-wp-hint-close:hover,
.sb-wp-hint-close:focus-visible {
    background: #fff;
    color: var(--sb-text);
}

/* 一覧の名前の横の「WordPress」のラベル（CH-1010） */
.sb-page-new .sb-site-cms {
    margin-left: 6px;
    padding: 0 8px;
    font-size: 12px;
    vertical-align: 1px;
}
