/**
 * ACS Internal Links — admin.css
 */

/* ── 共通 ────────────────────────────────────────────────────────────────── */

.acsil-wrap h1 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
}

.acsil-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 16px 20px;
    margin-top: 20px;
}

.acsil-card h2 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f1;
}

.acsil-footer {
    margin-top: 28px;
    color: #757575;
    font-size: 12px;
}

.acsil-footer a {
    color: #757575;
    text-decoration: none;
}

.acsil-footer a:hover {
    text-decoration: underline;
}

/* ── メッセージ ────────────────────────────────────────────────────────── */

.acsil-message {
    padding: 8px 12px;
    margin: 10px 0;
    border-radius: 3px;
    font-size: 13px;
}

.acsil-message-success {
    background: #edfaef;
    border-left: 4px solid #00a32a;
    color: #1a5c27;
}

.acsil-message-error {
    background: #fce8e8;
    border-left: 4px solid #d63638;
    color: #7c2525;
}

/* ── プログレスバー ────────────────────────────────────────────────────── */

.acsil-progress-wrap {
    margin: 12px 0;
}

.acsil-progress-bar-outer {
    background: #f0f0f1;
    border-radius: 4px;
    height: 10px;
    overflow: hidden;
}

.acsil-progress-bar-inner {
    background: #2271b1;
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.acsil-progress-text {
    font-size: 12px;
    color: #757575;
    margin: 4px 0 0;
}

/* ── フィルターバー ───────────────────────────────────────────────────── */

.acsil-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0;
    padding: 10px 14px;
    background: #f9f9f9;
    border: 1px solid #dcdcde;
    border-radius: 4px;
}

.acsil-filter-bar label {
    font-size: 13px;
    font-weight: 500;
}

/* ── リンクマップコンテナ ─────────────────────────────────────────────── */

.acsil-map-container {
    position: relative;
    width: 100%;
    min-height: 600px;
    background: #fafafa;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 12px;
}

.acsil-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    background: rgba(250, 250, 250, 0.85);
    z-index: 10;
}

#acsil-map-svg {
    display: block;
    width: 100%;
    cursor: grab;
}

#acsil-map-svg:active {
    cursor: grabbing;
}

/* ── D3ノード・エッジ ────────────────────────────────────────────────── */

.acsil-node {
    cursor: pointer;
}

.acsil-node circle {
    transition: filter 0.15s;
}

.acsil-node:hover circle {
    filter: brightness(1.15);
}

.acsil-node-label {
    font-size: 11px;
    fill: #333;
    pointer-events: none;
    user-select: none;
}

.acsil-node-label-hover {
    font-size: 12px;
    fill: #111;
    pointer-events: none;
    user-select: none;
    font-weight: 600;
}

.acsil-edge {
    fill: none;
    stroke: #bbb;
    stroke-width: 1px;
    transition: stroke 0.15s;
}

.acsil-map-warning {
    font-size: 12px;
    fill: #d63638;
}

/* ── ツールチップ ────────────────────────────────────────────────────── */

.acsil-tooltip {
    position: absolute;
    background: rgba(30, 30, 30, 0.88);
    color: #fff;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.6;
    pointer-events: none;
    max-width: 240px;
    z-index: 20;
    white-space: nowrap;
}

/* ── 凡例 ────────────────────────────────────────────────────────────── */

.acsil-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}

.acsil-legend-cat,
.acsil-legend-orphan {
    display: flex;
    align-items: center;
    gap: 4px;
}

.acsil-legend-note {
    flex: 1 0 100%;
    font-size: 11px;
    color: #999;
}

/* ── 孤立記事ページ ──────────────────────────────────────────────────── */

.acsil-count-label {
    margin: 10px 0 6px;
    font-size: 13px;
    color: #666;
}

.acsil-count-cell {
    font-weight: 600;
    font-size: 13px;
}

.acsil-count-zero-gray {
    color: #bbb;
    font-weight: normal;
}

.acsil-count-zero-red {
    color: #d63638;
}

.acsil-badge-draft {
    display: inline-block;
    background: #f0f0f1;
    color: #757575;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 5px;
    vertical-align: middle;
}

/* ── 投稿一覧カラム ──────────────────────────────────────────────────── */

.column-acsil_outgoing,
.column-acsil_incoming {
    width: 70px !important;
    text-align: center !important;
}

/* ── メタボックス ────────────────────────────────────────────────────── */

.acsil-meta-box {
    font-size: 12px;
}

.acsil-meta-section {
    margin-bottom: 12px;
}

.acsil-meta-heading {
    font-weight: 600;
    margin: 0 0 5px;
    color: #1d2327;
}

.acsil-meta-empty {
    color: #757575;
    font-style: italic;
    margin: 0;
}

.acsil-meta-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.acsil-meta-list li {
    padding: 3px 0;
    border-bottom: 1px solid #f0f0f1;
    line-height: 1.5;
}

.acsil-meta-list li:last-child {
    border-bottom: none;
}

.acsil-meta-list a {
    font-weight: 500;
}

.acsil-anchor-text {
    display: block;
    font-size: 11px;
    color: #757575;
    padding-left: 8px;
}

.acsil-meta-footer {
    margin: 8px 0 0;
    text-align: right;
}

/* ── ダッシュボードウィジェット ──────────────────────────────────────── */

.acsil-widget-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 4px;
}

.acsil-widget-table td {
    padding: 4px 2px;
    font-size: 13px;
}

.acsil-widget-num {
    text-align: right;
    font-weight: 600;
}

.acsil-widget-warn td {
    color: #d63638;
}

.acsil-widget-label {
    font-size: 12px;
    font-weight: 600;
    margin: 8px 0 4px;
    color: #1d2327;
}

.acsil-widget-top3 {
    margin: 0;
    padding-left: 18px;
    font-size: 12px;
}

.acsil-widget-top3 li {
    padding: 2px 0;
}

.acsil-widget-cnt {
    color: #757575;
    font-size: 11px;
    margin-left: 4px;
}

.acsil-widget-action {
    margin-top: 10px;
}

.acsil-widget-scan-time {
    font-size: 11px;
    color: #757575;
    margin-top: 4px;
}

/* ── 危険ボタン ──────────────────────────────────────────────────────── */

.acsil-btn-danger {
    color: #d63638 !important;
    border-color: #d63638 !important;
}

.acsil-btn-danger:hover {
    background: #fce8e8 !important;
}
