/* ============================================================
   Jobscout Notice Ticker v4 — card carousel.
   Full, un-truncated notice text; a visible "আরও পড়ুন" (Read More)
   link only appears on cards that actually have a link — otherwise
   the full description is shown, nothing is silently cut off.

   Optimized:
   - Added --jnt-50 and --jnt-600, which were referenced throughout
     this file (badges, header gradient, active tab, live badge) but
     never defined — those declarations were previously invalid and
     silently ignored by the browser. Values are interpolated to fit
     the existing --jnt-100/300/500/700 blue scale.
   - Removed unused --jnt-accent variable (defined, never read).
   ============================================================ */

.jnt-ticker {
    --jnt-pad-x: 18px;

    /* Blue palette */
    --jnt-50: #F2F6FF;
    --jnt-100: #BCCFFF;
    --jnt-300: #7CA2FF;
    --jnt-500: #4277E0;
    --jnt-600: #2159E5;
    --jnt-700: #0F4CFF;

    --jnt-accent-dark: #163f9e;

    position: relative;
    margin: 20px;
    max-width: 100%;
    border: 1px solid rgba(188, 207, 255, 0.5);
    border-radius: 18px;
    font-family: 'Hind Siliguri', sans-serif;
    box-sizing: border-box;
    overflow: hidden;
}
.jnt-ticker * {
    box-sizing: border-box;
}

/* Thin urgency gradient across the very top */
.jnt-ticker::before {
    content: "";
    display: block;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--jnt-600), var(--jnt-300));
}

/* ---------- Header: live badge + tabs + pause ---------- */
.jnt-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px var(--jnt-pad-x) 10px;
    background: linear-gradient(180deg, var(--jnt-50), #ffffff);
}

.jnt-live-badge {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(254, 242, 242, 0.9);
    color: #dc2626;
    border-radius: 999px;
    padding: 5px 11px 5px 8px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.jnt-live-dot {
    position: relative;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
}
.jnt-live-dot::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1.5px solid rgba(239, 68, 68, 0.55);
    animation: jntPing 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes jntPing {
    0%   { transform: scale(0.4); opacity: 1; }
    100% { transform: scale(1.7); opacity: 0; }
}

.jnt-tabs-wrap {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.jnt-tabs-wrap::-webkit-scrollbar { display: none; }

.jnt-tabs {
    position: relative;
    display: inline-flex;
    gap: 2px;
    background: rgba(66, 119, 224, 0.1);
    border-radius: 999px;
    padding: 3px;
}
.jnt-tab-indicator {
    position: absolute;
    top: 3px;
    left: 3px;
    height: calc(100% - 6px);
    width: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--jnt-600), var(--jnt-accent-dark));
    box-shadow: 0 2px 6px -1px rgba(33, 89, 229, 0.45);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}
.jnt-tab {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    background: transparent;
    color: #475569;
    border: none;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: color 0.2s ease;
}
.jnt-tab.active {
    color: #fff;
}

.jnt-pause-btn {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(124, 162, 255, 0.35);
    background: #ffffff;
    color: var(--jnt-500);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}
.jnt-pause-btn:hover {
    background: var(--jnt-50);
    color: var(--jnt-700);
}
.jnt-pause-btn:active {
    transform: scale(0.92);
}
.jnt-pause-btn:focus-visible,
.jnt-tab:focus-visible,
.jnt-nav:focus-visible,
.jnt-dot:focus-visible {
    outline: 2px solid var(--jnt-600);
    outline-offset: 2px;
}

.jnt-ticker.jnt-loading .jnt-carousel {
    opacity: 0.55;
}

/* ---------- Carousel ---------- */
.jnt-carousel {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 6px;
    padding: 4px var(--jnt-pad-x) 6px;
}

.jnt-carousel-viewport {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.jnt-carousel-viewport::-webkit-scrollbar { display: none; }

.jnt-carousel-track {
    display: flex;
    gap: 14px;
    padding: 10px 2px 14px;
}

.jnt-nav {
    display: none;
}
.jnt-nav:hover {
    background: var(--jnt-600);
    color: #fff;
}

/* ---------- Cards ---------- */
.jnt-card {
    scroll-snap-align: start;
    flex: 0 0 260px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--jnt-50);
    border: 1px solid rgba(124, 162, 255, 0.3);
    border-radius: 14px;
    padding: 14px 16px 16px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.jnt-card:hover {
    transform: translateY(-2px);
    border-color: rgba(66, 119, 224, 0.55);
    box-shadow: 0 10px 24px -14px rgba(33, 89, 229, 0.45);
}
.jnt-card-empty {
    flex: 1 1 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: transparent;
    border-style: dashed;
}

.jnt-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.jnt-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    line-height: 1.5;
    white-space: nowrap;
}
.jnt-badge svg { flex-shrink: 0; display: block; }
.jnt-badge-breaking { background: #fef2f2; color: #dc2626; }
.jnt-badge-deadline { background: #eaf0ff; color: var(--jnt-600); }
.jnt-badge-new      { background: #f0fdf4; color: #16a34a; }
.jnt-badge-update   { background: #fffbeb; color: #d97706; }

.jnt-card-time {
    flex-shrink: 0;
    font-size: 10.5px;
    color: #7c8aa8;
    font-weight: 500;
    white-space: nowrap;
}

.jnt-card-title {
    margin: 0;
    color: #10192e;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    /* wraps naturally — never ellipsis-cut */
}

.jnt-card-desc {
    margin: 0;
    color: #3d4a63;
    font-size: 12.5px;
    line-height: 1.6;
    white-space: normal;
    word-break: break-word;
    flex: 1;
}
/* Visual clamp is only ever applied when a "Read More" link exists,
   so the full text is always reachable — never truly hidden. */
.jnt-card-desc.jnt-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.jnt-card-more {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
    color: var(--jnt-600);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(66, 119, 224, 0.35);
    transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
}
.jnt-card-more:hover {
    background: var(--jnt-600);
    color: #fff;
    transform: translateX(1px);
}
.jnt-card-more svg { flex-shrink: 0; }

/* ---------- Dots ---------- */
.jnt-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    padding: 2px 0 16px;
}
.jnt-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    border: none;
    background: var(--jnt-100);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, width 0.2s ease;
}
.jnt-dot.active {
    width: 20px;
}

@media (max-width: 640px) {
    .jnt-ticker {
        --jnt-pad-x: 12px;
        margin: 6px;
        border-radius: 16px;
    }
    .jnt-header {
        gap: 8px;
        padding: 12px var(--jnt-pad-x) 8px;
    }
    .jnt-live-label {
        display: none;
    }
    .jnt-nav {
        width: 28px;
        height: 28px;
    }
    .jnt-card {
        flex-basis: 220px;
        padding: 12px 14px 14px;
    }
    .jnt-card-title {
        font-size: 13px;
    }
    .jnt-card-desc {
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jnt-live-dot::before { animation: none; }
    .jnt-carousel-viewport { scroll-behavior: auto; }
}