/**
 * Unified Blocking hub styling — left rail + pane layout.
 * Additive; scoped under .vmpf-blocking-hub so it cannot affect other views.
 *
 * @since 2.3.7
 */

.vmpf-hub-header {
    margin: 14px 0 10px;
}

.vmpf-hub-header h2 {
    margin: 0 0 2px;
    font-size: 22px;
}

.vmpf-hub-header p {
    margin: 0;
    color: #6b7280;
}

/* =========================================================================
   Seamless typography — one consistent text scale across every blocking pane
   ========================================================================= */

/* Pane / section titles */
.vmpf-hub-header h2,
.vmpf-blocking-pane .vmpf-asn-title,
.vmpf-blocking-pane .vmpfence-options-title h1,
.vmpf-blocking-pane .vmpfence-section-title,
.vmpf-blocking-pane .vmpfence-countries-title,
.vmpf-blocking-pane .vmpf-ai-panel__head h3,
.vmpf-blocking-pane .vmpfence-options-title-section h1 {
    font-size: 18px !important;
    font-weight: 700;
    color: #1e2a5a;
    line-height: 1.3;
}

.vmpf-hub-header h2 {
    font-size: 20px;
    margin: 0 0 2px;
}

/* Card / sub-section headings */
.vmpf-blocking-pane h3,
.vmpf-blocking-pane .vmpf-hub-card__title,
.vmpf-blocking-pane .vmpfence-settings-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e2a5a;
    line-height: 1.35;
}

/* Descriptions / subtitles / hints / notes */
.vmpf-hub-header p,
.vmpf-blocking-pane .vmpf-asn-desc,
.vmpf-blocking-pane .vmpf-ai-panel__desc p,
.vmpf-blocking-pane .vmpf-hub-card__desc,
.vmpf-blocking-pane .hint,
.vmpf-blocking-pane .description,
.vmpf-blocking-pane .vmpfence-aibox-note,
.vmpf-blocking-pane .vmpfence-field-description,
.vmpf-blocking-pane .vmpfence-help-description,
.vmpf-blocking-pane .vmpf-hub-empty,
.vmpf-blocking-pane .vmpf-hub-more {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

/* Small uppercase labels (card labels, unit captions) */
.vmpf-blocking-pane .vmpf-asn-card .lbl,
.vmpf-blocking-pane .vmpf-hub-card__unit {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #6b7280;
}

/* Tabular / list body text */
.vmpf-blocking-pane .vmpf-hub-table,
.vmpf-blocking-pane .vmpfence-custombot-table,
.vmpf-blocking-pane .vmpf-asn-iplist,
.vmpf-blocking-pane textarea {
    font-size: 13px;
}

.vmpf-blocking-hub {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 4px;
}


.vmpf-blocking-pane {
    flex: 1 1 auto;
    min-width: 0;
}

/* Reused views add their own top padding/margin — strip it so each pane's
   content starts flush with the rail top. */
.vmpf-blocking-pane .vmpfence-options-content,
.vmpf-blocking-pane .vmpfence-blocking-options-page {
    padding-top: 0 !important;
}

.vmpf-blocking-pane .vmpfence-options-title-section {
    margin-top: 0 !important;
}

/* The premium banner is fully self-contained (styles live in
   admin/views/partials/blocking-hub-premium.php) so it can be loaded anywhere. */

/* Full-width panel background wrapping the whole ASN section. */
.vmpf-blocking-pane .vmpf-asn-panel {
    margin-top: 0 !important;
    background: #fff;
    border: 1px solid #e2e4ea;
    border-radius: 12px;
    padding: 18px;
}

/* ASN title header bar with background. */
.vmpf-blocking-pane .vmpf-asn-head {
    background: #f5f6fb;
    border: 1px solid #e2e4ea;
    border-radius: 10px;
    padding: 14px 18px;
}

/* Two independent columns so each card stacks tightly under the one above
   (no gap from a taller card in the other column). */
.vmpf-blocking-pane .vmpf-asn-cols {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-top: 16px;
}

.vmpf-blocking-pane .vmpf-asn-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (max-width: 900px) {
    .vmpf-blocking-pane .vmpf-asn-cols {
        flex-direction: column;
    }
}

.vmpf-blocking-pane .vmpfence-blocking-rule-card:first-child {
    margin-top: 0 !important;
}

.vmpf-blocking-pane .vmpfence-firewall-box {
    margin-top: 0 !important;
    display: flow-root;
}

/* Contain child top-margins so the section starts flush with the rail
   (prevents margin-collapse pushing the whole pane down). */
.vmpf-blocking-pane .vmpf-hub-section {
    display: flow-root;
}


/* ---- Rail ---- */
.vmpf-hub-rail {
    flex: 0 0 210px;
    background: #fff;
    border: 1px solid #e2e4ea;
    border-radius: 10px;
    padding: 8px;
    position: sticky;
    top: 42px;
}

.vmpf-hub-rail__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.vmpf-hub-rail__item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #1e2a5a;
    font-weight: 500;
    line-height: 1.2;
}

.vmpf-hub-rail__item a:hover,
.vmpf-hub-rail__item a:focus {
    background: #f2f4fb;
}

.vmpf-hub-rail__item.is-active a {
    background: #1e2a5a;
    color: #fff;
}

.vmpf-hub-rail__badge {
    font-size: 11px;
    font-weight: 600;
    background: #eef0f6;
    color: #3b4468;
    border-radius: 999px;
    padding: 1px 8px;
    min-width: 20px;
    text-align: center;
}

.vmpf-hub-rail__item.is-active .vmpf-hub-rail__badge {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.vmpf-hub-rail__badge--on {
    background: #1f9d55;
    color: #fff;
}

.vmpf-hub-rail__badge--off {
    background: #e2e4ea;
    color: #6b7280;
}

.vmpf-hub-rail__divider {
    height: 1px;
    background: #e2e4ea;
    margin: 8px 4px;
}

/* ---- Overview ---- */
.vmpf-hub-overview__title {
    margin: 0 0 4px;
}

.vmpf-hub-overview__subtitle {
    margin: 0 0 18px;
    color: #6b7280;
}

.vmpf-hub-overview__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

@media (max-width: 900px) {
    .vmpf-hub-overview__grid {
        grid-template-columns: 1fr;
    }
}

.vmpf-hub-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #fff;
    border: 1px solid #e2e4ea;
    border-radius: 10px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    transition: border-color .12s ease, box-shadow .12s ease;
}

.vmpf-hub-card:hover {
    border-color: #1e2a5a;
    box-shadow: 0 2px 10px rgba(30, 42, 90, 0.08);
}

.vmpf-hub-card__value {
    font-size: 26px;
    font-weight: 700;
    color: #1e2a5a;
    line-height: 1.1;
}

.vmpf-hub-card__unit {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.vmpf-hub-card__title {
    margin-top: 8px;
    font-weight: 600;
}

.vmpf-hub-card__desc {
    font-size: 12px;
    color: #6b7280;
}

.vmpf-hub-overview__foot {
    margin-top: 18px;
}

/* ---- Section panes (ASN / AI) ---- */
.vmpf-hub-section__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.vmpf-hub-section__title {
    margin: 0 0 4px;
}

.vmpf-hub-section__subtitle {
    margin: 0;
    color: #6b7280;
}

.vmpf-hub-table {
    margin-top: 4px;
}

.vmpf-hub-empty,
.vmpf-hub-more {
    color: #6b7280;
}

.vmpf-hub-pill {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    padding: 2px 10px;
}

.vmpf-hub-pill--on {
    background: #1f9d55;
    color: #fff;
}

.vmpf-hub-pill--off {
    background: #e2e4ea;
    color: #6b7280;
}

/* ---- AI toggle (mirrors firewall-options; styles scoped to the hub pane
       in case that page's CSS isn't loaded on the blocking tab) ---- */
.vmpf-blocking-pane .vmpfence-btn-group {
    display: inline-flex;
    border: 1px solid #d0d5e0;
    border-radius: 6px;
    overflow: hidden;
}

.vmpf-blocking-pane .vmpfence-toggle-btn {
    padding: 7px 20px;
    border: 0;
    background: #fff;
    color: #3b4468;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .02em;
}

.vmpf-blocking-pane .vmpfence-toggle-btn + .vmpfence-toggle-btn {
    border-left: 1px solid #d0d5e0;
}

.vmpf-blocking-pane .vmpfence-toggle-btn:hover {
    background: #f2f4fb;
}

.vmpf-blocking-pane .vmpfence-toggle-btn-active {
    background: #1e2a5a;
    color: #fff;
}

.vmpf-blocking-pane .vmpfence-toggle-btn-active:hover {
    background: #1e2a5a;
}

.vmpf-blocking-pane .vmpfence-aibox-note {
    color: #6b7280;
    font-size: 12px;
}

/* AI pane panel: title header bar + two-column (description | toggle) body. */
.vmpf-blocking-pane .vmpf-ai-panel {
    margin-top: 0;
    background: #fff;
    border: 1px solid #e2e4ea;
    border-radius: 10px;
    overflow: hidden;
}

.vmpf-blocking-pane .vmpf-ai-panel__head {
    background: #f5f6fb;
    padding: 12px 18px;
    border-bottom: 1px solid #e2e4ea;
}

.vmpf-blocking-pane .vmpf-ai-panel__head h3 {
    margin: 0;
    color: #1e2a5a;
}

.vmpf-blocking-pane .vmpf-ai-panel__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px;
}

.vmpf-blocking-pane .vmpf-ai-panel__desc {
    flex: 1 1 auto;
    min-width: 0;
}

.vmpf-blocking-pane .vmpf-ai-panel__desc p {
    margin: 0 0 6px;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.5;
}

.vmpf-blocking-pane .vmpf-ai-panel__desc p:last-child {
    margin-bottom: 0;
}

.vmpf-blocking-pane .vmpf-ai-panel__control {
    flex: 0 0 auto;
}

@media (max-width: 782px) {
    .vmpf-blocking-pane .vmpf-ai-panel__body {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ---- Recent AI-crawler blocks table (styles not loaded on this tab) ---- */
.vmpf-blocking-pane .vmpfence-aiblocks {
    margin-top: 18px;
    border: 1px solid #e2e4ea;
    border-radius: 10px;
    background: #fff;
}

.vmpf-blocking-pane .vmpfence-aiblocks__summary {
    cursor: pointer;
    padding: 12px 16px;
    font-weight: 600;
    color: #1e2a5a;
}

.vmpf-blocking-pane .vmpfence-aiblocks__body {
    padding: 4px 16px 16px;
}

.vmpf-blocking-pane .vmpf-verdict.is-verified {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #1f9d55;
    background: #e7f6ee;
    border-radius: 4px;
    padding: 1px 6px;
    margin-right: 2px;
}

.vmpf-blocking-pane .vmpf-status {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    padding: 2px 10px;
}

.vmpf-blocking-pane .vmpf-status.is-blocked {
    background: #fdecec;
    color: #c0392b;
}

.vmpf-blocking-pane .vmpf-status.is-allowed {
    background: #e7f6ee;
    color: #1f9d55;
}

.vmpf-blocking-pane .vmpf-aiblocks-msg {
    color: #6b7280;
    padding: 14px 8px;
    text-align: center;
}

@media (max-width: 782px) {
    .vmpf-blocking-hub {
        flex-direction: column;
    }
    .vmpf-hub-rail {
        flex-basis: auto;
        width: 100%;
        position: static;
    }
    .vmpf-hub-rail__list {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }
    .vmpf-hub-rail__divider {
        display: none;
    }
}
