@charset 'UTF-8';

/* =========================================================
   アカウントX内サーチ機能（monitor.html 下部）
   炎上監視の一覧とは目的が違うため、見出しから区切って表示する
   ========================================================= */
.account-search-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 18px;
}

.account-search-title {
    margin: 8px 0 0 !important;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.4;
}

#account-search-loading[style*="block"] {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.account-search-card {
    padding: 22px 24px;
    border-radius: 22px;
    border: 1px solid var(--line-soft);
    background: var(--surface);
}

/* JSが display:block を付けるので、縦並びのレイアウトに置き換える */
.account-search-card[style*="block"] {
    display: flex !important;
    flex-direction: column;
    gap: 18px;
}

.account-search-card p {
    margin: 0;
}

.account-search-empty-text {
    font-size: 14px;
    line-height: 1.9;
    color: var(--text-2);
}

/* ---------- 未登録：アカウント選択＋登録 ---------- */
.account-search-register-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.account-search-select-wrap {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.account-search-select-wrap::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 16px;
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--text-3);
    border-bottom: 2px solid var(--text-3);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.account-search-register-row select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 44px;
    padding: 0 40px 0 14px;
    box-sizing: border-box;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.account-search-register-row select:disabled {
    background: var(--surface-2);
    color: var(--text-3);
    cursor: not-allowed;
}

/* ---------- 登録済み：対象アカウント ---------- */
.account-search-target-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line-soft);
}

.account-search-target-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-2);
    box-shadow: 0 0 0 1px var(--line-soft);
}

.account-search-target-body {
    min-width: 0;
}

.account-search-target-name {
    font-size: 17px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.account-search-target-meta {
    margin-top: 2px !important;
    font-size: 12px;
    color: var(--text-3);
}

.account-search-block-title {
    margin-bottom: 10px !important;
    font-size: 13px;
    font-weight: 900;
    color: var(--text);
}

/* ---------- キーワード ---------- */
.account-search-keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.account-search-keyword-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 6px 0 14px;
    box-sizing: border-box;
    border-radius: 100px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.account-search-keyword-remove {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--line-soft);
    color: var(--text-2);
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.account-search-keyword-remove:hover {
    background: var(--line);
    color: var(--text);
}

.account-search-keyword-empty {
    font-size: 13px;
    color: var(--text-3);
}

.account-search-keyword-add-row {
    display: flex;
    gap: 8px;
    max-width: 520px;
    margin-top: 10px;
}

.account-search-keyword-add-row input {
    flex: 1;
    min-width: 0;
    height: 42px;
    padding: 0 14px;
    box-sizing: border-box;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 14px;
}

.account-search-keyword-add-row input::placeholder {
    color: var(--text-3);
}

.account-search-keyword-add-btn {
    height: 42px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.account-search-keyword-add-btn:hover {
    background: var(--surface-2);
}

.account-search-keyword-add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---------- 初回検索の手動実行 ---------- */
.account-search-run-row[style*="block"] {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--accent-soft);
}

.account-search-run-hint {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text);
}

.account-search-run-btn {
    flex-shrink: 0;
}

/* ---------- 発見された言及 ---------- */
.account-search-mention-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.account-search-mention-empty {
    grid-column: 1 / -1;
    padding: 18px 16px;
    border-radius: 14px;
    border: 1px dashed var(--line);
    color: var(--text-3);
    font-size: 13px;
    text-align: center;
}

.account-search-mention-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--line-soft);
    background: var(--surface-2);
}

.account-search-mention-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.account-search-mention-author {
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-search-mention-date {
    flex-shrink: 0;
    font-family: var(--font-family-en), sans-serif;
    font-size: 11px;
    color: var(--text-3);
    white-space: nowrap;
}

.account-search-mention-text {
    flex: 1;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text);
    overflow-wrap: anywhere;
}

.account-search-mention-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.account-search-mention-keyword {
    min-width: 0;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-ink);
}

.account-search-mention-keyword:not(:empty) {
    padding: 2px 10px;
    border-radius: 100px;
    background: var(--accent-soft);
}

.account-search-mention-link {
    flex-shrink: 0;
    margin-left: auto;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-ink);
    text-decoration: none;
}

.account-search-mention-link:hover {
    text-decoration: underline;
}

#account-search-unregister-btn {
    align-self: flex-start;
}

/* ---------- スマホ ---------- */
@media (max-width: 768px) {
    .account-search-title {
        font-size: 19px;
    }

    .account-search-card {
        padding: 18px 16px;
        border-radius: 18px;
    }

    .account-search-register-row .monitor-add-btn {
        width: 100%;
    }

    .account-search-run-row[style*="block"] {
        flex-direction: column;
        align-items: stretch;
    }

    .account-search-mention-list {
        grid-template-columns: 1fr;
    }
}
