/* Bol Batami UI layer, loaded after output.css on the public site and in admin.
   Hand-written because output.css is a prebuilt Tailwind file that only has the classes used when it was compiled. */

/* Mukta carries the Devanagari glyphs that Inter lacks. */
body {
    font-family: 'Inter', 'Mukta', 'Noto Sans Devanagari', sans-serif;
}

/* Devanagari matras get clipped at Tailwind's tight leadings. */
:lang(mr) .leading-none { line-height: 1.2; }
:lang(mr) .leading-tight { line-height: 1.38; }
:lang(mr) .leading-snug { line-height: 1.45; }

/* Logo lockup (499x144 source, transparent). */
.bb-logo { display: block; height: 42px; width: auto; }
.bb-logo-sm { height: 36px; }
.bb-logo-footer { height: 52px; }
@media (max-width: 359px) {
    .bb-logo { height: 34px; }
}
@media (min-width: 768px) {
    .bb-logo { height: 52px; }
    .bb-logo-sm { height: 36px; }
    .bb-logo-footer { height: 56px; }
}

/* Header: the full category menu only fits from 1280px up; below that the drawer is used. */
.bb-desktop-nav { display: none !important; }
@media (min-width: 1280px) {
    .bb-desktop-nav { display: flex !important; }
    .bb-mobile-only { display: none !important; }
    .bb-cat-wrap { display: block !important; }
}
.bb-cat-wrap { border-top: 1px solid #f1f5f9; }
.bb-cat-row {
    height: 48px;
    justify-content: space-between;
    overflow-x: auto;
    scrollbar-width: none;
}
.bb-cat-row::-webkit-scrollbar { display: none; }
.bb-cat-row > a {
    flex-shrink: 0;
    padding: .5rem;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
}

/* Article body */
.bb-prose {
    font-size: 1.125rem;
    line-height: 1.85;
    color: #1e293b;
    overflow-wrap: break-word;
}
.bb-prose p { margin: 0 0 1.25em; }
.bb-prose h2, .bb-prose h3, .bb-prose h4 { line-height: 1.4; }
.bb-prose li { margin-bottom: .4em; }
.bb-prose a { color: #4338ca; text-decoration: underline; text-underline-offset: 3px; }
.bb-prose img { max-width: 100%; height: auto; }
.bb-prose table { display: block; max-width: 100%; overflow-x: auto; }
@media (max-width: 639px) {
    .bb-prose { font-size: 1.0625rem; line-height: 1.8; }
}

/* Lead image keeps its box while it loads. */
.bb-lead-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #e2e8f0;
}

/* Story images: covers are 1200x675 (16:9) with text printed on them, so boxes keep that shape and nothing is cropped. */
.bb-thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e2e8f0;
}
.bb-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.group:hover .bb-thumb img { transform: scale(1.03); }
.bb-thumb-side { align-self: flex-start; }
.bb-thumb-side > a { display: block; height: 100%; }

/* Homepage lead cards: image on top, text below. */
.bb-card {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 10px 30px -12px rgba(15, 23, 42, .15);
    transition: box-shadow .3s ease;
}
.bb-card:hover { box-shadow: 0 16px 40px -12px rgba(79, 70, 229, .25); }
.bb-card-body { padding: .9rem 1.1rem 1.1rem; }
.bb-card-body-lg { padding: 1.1rem 1.25rem 1.4rem; }
.bb-chip {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #4f46e5;
    margin-bottom: .4rem;
}
.bb-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.45;
    color: #0f172a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bb-card-title-lg {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.4;
    color: #0f172a;
    margin-bottom: .6rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
@media (min-width: 768px) {
    .bb-card-title-lg { font-size: 1.75rem; }
}
.bb-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    align-items: center;
    font-size: .8rem;
    font-weight: 600;
    color: #64748b;
}

/* WhatsApp button stays under the open menu drawer (header is z-40). */
a.floating-whatsapp { z-index: 30; }

/* Ad slot wrapper, rendered only when an ad exists. */
.bb-ad-label {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: .5rem;
}

/* Search form: one row of input + button on phones, the category select below. */
.bb-search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .75rem;
    align-items: end;
}
.bb-search-form .bb-search-q { grid-column: 1 / -1; }
.bb-search-form .bb-search-label { display: none; }
@media (min-width: 768px) {
    .bb-search-form { grid-template-columns: 2fr 1fr auto; gap: 1rem; }
    .bb-search-form .bb-search-q { grid-column: auto; }
    .bb-search-form .bb-search-label { display: block; }
}
.bb-search-form button { padding: .85rem 1.5rem; }
.bb-search-head { margin-bottom: 1.5rem; }
.bb-search-box { padding: .75rem; margin-bottom: 2rem; }
@media (min-width: 768px) {
    .bb-search-head { margin-bottom: 2.5rem; }
    .bb-search-box { padding: 1.25rem; margin-bottom: 3rem; }
}

/* Footer contact column sits beside the newsletter form from 640px. */
@media (min-width: 640px) {
    .bb-contact-col { border-left-width: 1px; border-left-style: solid; padding-left: 1.5rem; }
}

/* Keyboard focus that is visible on both light and dark backgrounds. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #6366f1;
    outline-offset: 2px;
    border-radius: 6px;
}

.bb-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.bb-skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 10000;
    background: #4f46e5;
    color: #fff;
    padding: .6rem 1rem;
    border-radius: 8px;
    font-weight: 700;
}
.bb-skip-link:focus { top: 1rem; }

/* Admin: two-line post titles in tables. */
.bb-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Honour the OS "reduce motion" setting. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    .animate-marquee {
        animation: none !important;
        position: static !important;
        white-space: nowrap;
        overflow-x: auto;
    }
    .floating-whatsapp { animation: none !important; }
}

/* ---------- Breaking / latest-news ticker (layouts/breaking_ticker.php) ---------- */
.bb-ticker {
    --bb-tk-accent: #4f46e5;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    z-index: 30;
    font-family: 'Mukta', 'Inter', sans-serif;
}
.bb-ticker.is-breaking { --bb-tk-accent: #dc2626; }
.bb-ticker-inner { display: flex; align-items: stretch; min-height: 42px; padding: 0; }
.bb-ticker-label {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: 0 1rem;
    background: var(--bb-tk-accent);
    color: #fff;
    font-weight: 700;
    font-size: .875rem;
    white-space: nowrap;
    position: relative;
}
.bb-ticker-label::after {
    content: "";
    position: absolute;
    right: -10px;
    top: 0;
    bottom: 0;
    width: 10px;
    background: var(--bb-tk-accent);
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.bb-ticker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, .7);
    animation: bb-tk-pulse 1.6s ease-out infinite;
}
@keyframes bb-tk-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); }
    80%, 100% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); }
}
.bb-ticker-viewport {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: #f8fafc;
    padding-left: 14px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 32px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 32px), transparent 100%);
}
.bb-ticker-track {
    display: flex;
    width: max-content;
    margin: 0;
    padding: 0;
    list-style: none;
    animation: bb-tk-scroll var(--bb-ticker-duration, 60s) linear infinite;
    will-change: transform;
}
@keyframes bb-tk-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.bb-ticker:hover .bb-ticker-track,
.bb-ticker:focus-within .bb-ticker-track,
.bb-ticker.is-paused .bb-ticker-track { animation-play-state: paused; }
.bb-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: 0 1.25rem;
    white-space: nowrap;
    font-size: .9375rem;
    font-weight: 500;
    color: #1e293b;
    position: relative;
}
.bb-ticker-item::before {
    content: "";
    position: absolute;
    left: -3px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bb-tk-accent);
    opacity: .6;
}
.bb-ticker-item a { color: inherit; text-decoration: none; transition: color .15s; }
.bb-ticker-item a:hover, .bb-ticker-item a:focus-visible { color: var(--bb-tk-accent); text-decoration: underline; text-underline-offset: 3px; }
.bb-ticker-tag {
    font-size: .6875rem;
    font-weight: 700;
    color: var(--bb-tk-accent);
    background: color-mix(in srgb, var(--bb-tk-accent) 10%, #fff);
    border-radius: 999px;
    padding: 1px 8px;
    font-family: 'Inter', 'Mukta', sans-serif;
}
.bb-ticker-time { font-size: .75rem; color: #64748b; }
.bb-ticker-toggle {
    flex-shrink: 0;
    width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 0;
    border-left: 1px solid #e2e8f0;
    color: #475569;
    font-size: .75rem;
    cursor: pointer;
    transition: color .15s, background .15s;
}
.bb-ticker-toggle:hover { color: var(--bb-tk-accent); background: #f8fafc; }
@media (max-width: 639px) {
    .bb-ticker-inner { min-height: 38px; }
    .bb-ticker-label { padding: 0 .65rem; font-size: .8125rem; }
    .bb-ticker-item { font-size: .875rem; padding: 0 1rem; }
    .bb-ticker-tag { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .bb-ticker-track { animation: none !important; }
    .bb-ticker-viewport { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
    .bb-ticker-track li[aria-hidden="true"] { display: none; }
    .bb-ticker-dot { animation: none !important; }
    .bb-ticker-toggle { display: none; }
}
