/* BWNS Popup — frontend styles */

#bwns-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 35, 10, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    box-sizing: border-box;
}
#bwns-overlay.bwns-visible {
    opacity: 1;
    pointer-events: all;
}
#bwns-popup {
    position: relative;
    width: 100%;
    max-width: 500px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(10, 40, 10, 0.4);
    transform: translateY(24px) scale(0.97);
    transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.3s ease;
    opacity: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-height: 90vh;
    overflow-y: auto;
}
#bwns-overlay.bwns-visible #bwns-popup {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Header */
.bwns-hd {
    padding: 26px 30px 20px;
    position: relative;
}
.bwns-logo-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.bwns-logo-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.15);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.bwns-school-name {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    line-height: 1.1;
}
.bwns-school-tag {
    font-size: 10px;
    color: rgba(255,255,255,0.55);
    letter-spacing: 0.7px;
}
.bwns-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,232,80,0.18);
    border: 1px solid rgba(255,232,80,0.4);
    color: #ffe850;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.2px;
    padding: 3px 11px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.bwns-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ffe850;
    display: inline-block;
    animation: bwns-pulse 1.5s ease infinite;
}
@keyframes bwns-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.3; transform: scale(0.6); }
}
.bwns-headline {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #fff !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
}
.bwns-headline em {
    font-style: normal;
    color: #ffe850;
}
.bwns-tagline {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    margin-top: 5px;
    margin-bottom: 0;
}

/* Yellow strip */
.bwns-strip {
    background: #ffe850;
    padding: 8px 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.bwns-strip .s-label { font-size: 12px; font-weight: 600; color: #1e5c1a; }
.bwns-strip .s-tag {
    background: #1e5c1a;
    color: #ffe850;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}
.bwns-strip .s-cbse {
    margin-left: auto;
    font-size: 10px;
    color: #3a6e15;
    font-weight: 600;
}

/* Body */
.bwns-body { padding: 20px 30px 24px; }
.bwns-section-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 9px;
    margin-top: 0;
}

/* 4Q */
.bwns-4q {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
    margin-bottom: 18px;
}
.bwns-q-chip {
    background: #f0f9ee;
    border: 1px solid #b8ddb3;
    border-radius: 8px;
    padding: 9px 7px;
    text-align: center;
}
.bwns-q-chip .q-title { font-size: 13px; font-weight: 700; color: #1e5c1a; }
.bwns-q-chip .q-sub   { font-size: 10px; color: #4a8e42; }

/* Grades */
.bwns-grades {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
    margin-bottom: 18px;
}
.bwns-g-chip {
    background: #f0f9ee;
    border: 1px solid #b8ddb3;
    border-radius: 8px;
    padding: 8px 6px;
    text-align: center;
}
.bwns-g-chip .g-label { font-size: 11px; font-weight: 700; color: #1e5c1a; line-height: 1.2; }
.bwns-g-chip .g-range { font-size: 10px; color: #6aab60; }

/* Highlights */
.bwns-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}
.bwns-hl {
    background: #fffbea;
    border: 1px solid #f0dc80;
    border-radius: 8px;
    padding: 10px;
}
.bwns-hl .hl-icon  { font-size: 16px; margin-bottom: 4px; }
.bwns-hl .hl-title { font-size: 11px; font-weight: 700; color: #5a3e00; }
.bwns-hl .hl-sub   { font-size: 10px; color: #9a7010; }

/* CTA */
.bwns-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff !important;
    border: none;
    border-radius: 10px;
    padding: 13px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    transition: filter 0.2s, transform 0.15s;
    width: 100%;
    box-sizing: border-box;
}
.bwns-btn:hover { transform: translateY(-1px); }

/* Footer */
.bwns-foot {
    text-align: center;
    font-size: 11px;
    color: #bbb;
    margin-top: 12px;
    margin-bottom: 0;
}
.bwns-foot a { color: #3a8830; text-decoration: none; }

/* Close */
.bwns-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.85);
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
    line-height: 1;
    padding: 0;
}
.bwns-close:hover { background: rgba(255,255,255,0.28); }

/* Responsive */
@media (max-width: 480px) {
    .bwns-hd { padding: 20px 20px 16px; }
    .bwns-hd h2 { font-size: 24px !important; }
    .bwns-strip, .bwns-body { padding-left: 20px; padding-right: 20px; }
    .bwns-4q, .bwns-grades { grid-template-columns: repeat(2, 1fr); }
    .bwns-highlights { grid-template-columns: 1fr 1fr; }
    .bwns-highlights .bwns-hl:last-child { grid-column: span 2; }
}
