/* =============================================
   LightningMine IP Checker — lm-ip-checker.css
   Extends lightningmine-diagnostics.css conventions
   ============================================= */

/* ── Section cards ── */
.lm-ip-section {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    animation: lm-ip-fadeup 0.22s ease both;
}
@keyframes lm-ip-fadeup {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.lm-ip-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f8fc;
    padding: 11px 16px;
    border-bottom: 1px solid #ddd;
}
.lm-ip-section-header h3 {
    margin: 0;
    font-size: 15px;
    color: #1a1a2e;
}

/* ── Badges ── */
.lm-ip-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    font-family: "Courier New", Courier, monospace;
    letter-spacing: 0.6px;
}
.lm-ip-badge-green  { background: #d4f8e8; color: #1b7a40; }
.lm-ip-badge-yellow { background: #fff8d6; color: #7a5c00; }
.lm-ip-badge-red    { background: #fde8e8; color: #b52020; }
.lm-ip-badge-orange { background: #fff0e0; color: #9c4400; }
.lm-ip-badge-blue   { background: #dbeeff; color: #0073aa; }
.lm-ip-badge-grey   { background: #f0f4f8; color: #5a6a7e; }
.lm-ip-badge-purple { background: #ede7ff; color: #5b34b5; }

/* ── Section body ── */
.lm-ip-section-body {
    padding: 14px 18px;
    font-size: 13px;
    line-height: 1.65;
    color: #1a1a2e;
}

/* ── Key-value rows ── */
.lm-ip-kv-row {
    display: flex;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid #f0f4f8;
    font-size: 13px;
    flex-wrap: wrap;
    align-items: flex-start;
}
.lm-ip-kv-row:last-child { border-bottom: none; }
.lm-ip-kv-key {
    min-width: 170px;
    font-weight: 600;
    color: #5a6a7e;
    flex-shrink: 0;
}
.lm-ip-kv-val {
    flex: 1;
    font-family: "Courier New", Courier, monospace;
    word-break: break-all;
    color: #1a1a2e;
}

/* ── Abuse score bar ── */
.lm-ip-abuse-score-wrap {
    margin: 12px 0 16px;
}
.lm-ip-abuse-score-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 6px;
}
.lm-ip-abuse-bar-bg {
    background: #e8edf3;
    border-radius: 6px;
    height: 14px;
    overflow: hidden;
}
.lm-ip-abuse-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 1s ease;
}
.lm-ip-abuse-bar-fill.clean    { background: #28a745; }
.lm-ip-abuse-bar-fill.low      { background: #87c545; }
.lm-ip-abuse-bar-fill.medium   { background: #ffc107; }
.lm-ip-abuse-bar-fill.high     { background: #fd7e14; }
.lm-ip-abuse-bar-fill.critical { background: #dc3545; }

/* ── Flags / tag pills ── */
.lm-ip-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.lm-ip-flag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.lm-ip-flag-bad  { background: #fde8e8; color: #b52020; border: 1px solid #f5c0c0; }
.lm-ip-flag-good { background: #d4f8e8; color: #1b7a40; border: 1px solid #a3e4c0; }
.lm-ip-flag-warn { background: #fff8d6; color: #7a5c00; border: 1px solid #ffe08a; }

/* ── Categories list ── */
.lm-ip-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.lm-ip-category {
    background: #fde8e8;
    color: #b52020;
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    font-family: "Courier New", Courier, monospace;
}

/* ── Blacklist table ── */
.lm-ip-bl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 8px;
}
.lm-ip-bl-table th {
    text-align: left;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #8a9bb0;
    background: #e8f4ff;
    border-bottom: 1px solid #ddd;
}
.lm-ip-bl-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f4f8;
    font-family: "Courier New", Courier, monospace;
}
.lm-ip-bl-table tr:last-child td { border-bottom: none; }
.lm-ip-bl-table tr:hover td { background: #f8fbff; }
.lm-ip-listed { color: #b52020; font-weight: 700; }
.lm-ip-clean  { color: #1b7a40; }

/* ── Note boxes ── */
.lm-ip-note {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.6;
}
.lm-ip-note.good { background: #f0fdf4; border-left: 3px solid #28a745; }
.lm-ip-note.warn { background: #fffbea; border-left: 3px solid #f59e0b; }
.lm-ip-note.bad  { background: #fff3f3; border-left: 3px solid #dc3545; }
.lm-ip-note.info { background: #f0f7ff; border-left: 3px solid #0073aa; }

/* ── Map link button ── */
.lm-ip-map-link {
    display: inline-block;
    margin-top: 10px;
    padding: 7px 16px;
    background: #0073aa;
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}
.lm-ip-map-link:hover { background: #005f8d; color: #fff; text-decoration: none; }

/* ── Status bar ── */
.lm-ip-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #5a6a7e;
    margin-bottom: 16px;
    padding: 8px 12px;
    background: #f5f8fc;
    border-radius: 6px;
    border: 1px solid #d0d7e3;
}
.lm-ip-status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #28a745;
    flex-shrink: 0;
}
.lm-ip-highlight {
    font-family: "Courier New", Courier, monospace;
    font-weight: 600;
    color: #0073aa;
}

/* ── Loader ── */
.lm-tool-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 48px 0;
    font-size: 14px;
    color: #5a6a7e;
}
.lm-tool-spinner {
    width: 20px; height: 20px;
    border: 2px solid #d0d7e3;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: lm-ip-spin 0.65s linear infinite;
    flex-shrink: 0;
}
@keyframes lm-ip-spin { to { transform: rotate(360deg); } }

/* ── Error ── */
.lm-tool-error {
    background: #fff3f3;
    border: 1px solid #f5c0c0;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 13px;
    color: #c0392b;
    font-family: "Courier New", Courier, monospace;
}

/* ── About box ── */
.lm-tool-about {
    margin-top: 20px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 13px;
    color: #555;
    line-height: 1.7;
}
.lm-tool-about strong { color: #1a1a2e; }

/* ── Responsive ── */
@media (max-width: 580px) {
    .lm-ip-kv-key { min-width: 120px; }
}
