/* Bot Blocker - Admin Stylesheet v1.2.0 */

/* ------------------------------------------------------------------ */
/* Base                                                                  */
/* ------------------------------------------------------------------ */
.bot-blocker-wrap{color:#dbe7f3}
.bb-notice{padding:10px 14px;border-radius:8px;margin:0 0 14px;font-size:13px;line-height:1.5}
.bb-notice--warn{background:rgba(255,59,48,.12);border:1px solid rgba(255,59,48,.35);color:#ffb3ae}
.bb-notice--info{background:rgba(59,130,246,.12);border:1px solid rgba(59,130,246,.35);color:#93c5fd}

/* ------------------------------------------------------------------ */
/* Map overlay panel (stats + legend)                                    */
/* ------------------------------------------------------------------ */
.bot-blocker-wrap .bb-map-overlay{
    position:absolute;
    bottom:18px;
    left:18px;
    z-index:20;
    display:flex;
    flex-direction:column;
    gap:8px;
    pointer-events:none;
}
.bot-blocker-wrap .bb-overlay-stats{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    pointer-events:auto;
}
.bot-blocker-wrap .bb-count{
    background:rgba(11,18,32,.82);
    border:1px solid rgba(36,52,71,.9);
    border-radius:8px;
    padding:5px 10px;
    color:#c9d7e8;
    font-size:12px;
    backdrop-filter:blur(6px);
    -webkit-backdrop-filter:blur(6px);
    transition:border-color .2s;
    white-space:nowrap;
}
.bot-blocker-wrap .bb-count:hover{border-color:#3b82f6}
.bot-blocker-wrap .bb-count strong{font-size:15px;margin-left:5px;color:#fff;font-variant-numeric:tabular-nums}
.bot-blocker-wrap .bb-overlay-legend{
    display:flex;
    flex-wrap:wrap;
    gap:8px 12px;
    font-size:11px;
    color:#7a9ab8;
    background:rgba(11,18,32,.78);
    border:1px solid rgba(36,52,71,.8);
    border-radius:8px;
    padding:5px 10px;
    backdrop-filter:blur(6px);
    -webkit-backdrop-filter:blur(6px);
    pointer-events:auto;
    align-items:center;
}
.bot-blocker-wrap .bb-last-updated{
    font-size:10px;
    color:#5a7a99;
    white-space:nowrap;
    background:rgba(11,18,32,.72);
    border-radius:6px;
    padding:3px 8px;
    backdrop-filter:blur(4px);
    -webkit-backdrop-filter:blur(4px);
    align-self:flex-start;
}

/* Stat pill pulse on value change */
@keyframes bb-stat-pulse {
    0%   { border-color: #3b82f6; box-shadow: 0 0 0 0 rgba(59,130,246,.6); }
    50%  { border-color: #60a5fa; box-shadow: 0 0 0 5px rgba(59,130,246,.0); }
    100% { border-color: #243447; box-shadow: 0 0 0 0 rgba(59,130,246,.0); }
}
.bot-blocker-wrap .bb-count--pulse {
    animation: bb-stat-pulse 0.65s ease-out forwards;
}

/* ------------------------------------------------------------------ */
/* Legend dot (shared by overlay legend)                                 */
/* ------------------------------------------------------------------ */
.bot-blocker-wrap .bb-legend-dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:4px;vertical-align:middle;flex-shrink:0}

/* ------------------------------------------------------------------ */
/* Monitor grid                                                          */
/* ------------------------------------------------------------------ */
.bot-blocker-wrap .bb-monitor-grid{display:grid;grid-template-columns:minmax(0,1fr) 360px;grid-template-rows:680px;gap:16px}
.bot-blocker-wrap .bb-monitor-grid>*{min-height:0}
.bot-blocker-wrap #bb-monitor-map{width:100%;height:100%;min-height:0;position:relative}

.bot-blocker-wrap .js-plotly-plot,
.bot-blocker-wrap .plot-container{width:100%;height:100%}
.bot-blocker-wrap .js-plotly-plot{background:#0b1220;border:1px solid #243447;border-radius:14px;overflow:hidden}

/* ------------------------------------------------------------------ */
/* Dot arrival pulse overlay                                             */
/* ------------------------------------------------------------------ */
@keyframes bb-dot-pulse-ring {
    0%   { transform: translate(-50%,-50%) scale(0.4); opacity: 1; }
    80%  { transform: translate(-50%,-50%) scale(2.4); opacity: 0; }
    100% { transform: translate(-50%,-50%) scale(2.4); opacity: 0; }
}
.bot-blocker-wrap .bb-dot-pulse {
    position:       absolute;
    width:          22px;
    height:         22px;
    border-radius:  50%;
    border:         2px solid currentColor;
    pointer-events: none;
    z-index:        10;
    animation:      bb-dot-pulse-ring 1.2s ease-out forwards;
    /* left/top set by JS */
}

/* ------------------------------------------------------------------ */
/* Live feed panel                                                       */
/* ------------------------------------------------------------------ */
.bot-blocker-wrap .bb-feed{background:#101826;border:1px solid #243447;border-radius:14px;overflow:hidden;height:100%;display:flex;flex-direction:column;min-height:0;position:relative}
.bot-blocker-wrap .bb-feed h2{margin:0;padding:13px 16px;border-bottom:1px solid #243447;color:#fff;font-size:14px;flex:0 0 auto;display:flex;align-items:center;gap:8px}

/* Pulsing live green dot in feed header */
@keyframes bb-live-dot {
    0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,.7); }
    50%     { opacity: .7; box-shadow: 0 0 0 5px rgba(34,197,94,.0); }
}
.bot-blocker-wrap .bb-live-dot {
    display:       inline-block;
    width:         8px;
    height:        8px;
    border-radius: 50%;
    background:    #22c55e;
    flex-shrink:   0;
    animation:     bb-live-dot 1.8s ease-in-out infinite;
}

/* ------------------------------------------------------------------ */
/* Feed list                                                             */
/* ------------------------------------------------------------------ */
.bot-blocker-wrap #bb-feed-list{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain}
.bot-blocker-wrap .bb-feed-item{padding:11px 14px;border-bottom:1px solid #1b2838;border-left:4px solid var(--bb-accent,#3b82f6);cursor:default;transition:background .15s}
.bot-blocker-wrap .bb-feed-item:hover{background:#141f2e}
.bot-blocker-wrap .bb-feed-main{font-weight:700;color:#fff;font-size:13px}
.bot-blocker-wrap .bb-feed-sub,
.bot-blocker-wrap .bb-feed-meta{color:#9fb0c4;margin-top:3px;font-size:12px;word-break:break-word}
.bot-blocker-wrap .bb-feed-time{float:right;color:#5a7a99;font-size:11px}
.bot-blocker-wrap .bb-tag{display:inline-block;padding:1px 6px;border-radius:4px;background:rgba(255,255,255,.07);font-size:11px;color:#c9d7e8;margin-right:4px}
.bot-blocker-wrap .bb-tag--verif{background:rgba(59,130,246,.18);color:#93c5fd}
.bot-blocker-wrap .bb-burst{display:inline-block;padding:1px 5px;border-radius:4px;background:rgba(255,214,10,.18);color:#ffd60a;font-size:11px;font-weight:600;margin-left:4px}
.bot-blocker-wrap .bb-feed-empty{padding:24px 16px;color:#5a7a99;font-size:13px;text-align:center}

/* ------------------------------------------------------------------ */
/* Misc                                                                  */
/* ------------------------------------------------------------------ */
.bot-blocker-wrap .wrap .form-table textarea{width:100%;max-width:900px}
.bot-blocker-wrap .tablenav .actions{display:flex;gap:8px;align-items:center}

/* ------------------------------------------------------------------ */
/* Responsive                                                            */
/* ------------------------------------------------------------------ */
@media (max-width:1280px){
    .bot-blocker-wrap .bb-monitor-grid{grid-template-columns:1fr;grid-template-rows:420px 420px}
    .bot-blocker-wrap .bb-monitor-grid>*{min-height:0}
    .bot-blocker-wrap .bb-feed{order:2;height:100%}
    .bot-blocker-wrap #bb-feed-list{min-height:0}
    .bot-blocker-wrap #bb-monitor-map{height:100%;min-height:0}
    .bot-blocker-wrap .js-plotly-plot,
    .bot-blocker-wrap .plot-container{height:100%}
    .bot-blocker-wrap .bb-topbar-controls{margin-left:0}
}
