/* ============================================================
   NOTICE CARDS by CSP — Frontend Card Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* ── Container ────────────────────────────────────────────── */
#ncc-mount {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 2147483647;
    display: flex;
    flex-direction: column-reverse;
    gap: 16px;
    width: 380px;
    max-width: calc(100vw - 32px);
    pointer-events: none;
}

/* ── Card ─────────────────────────────────────────────────── */
.ncc-card {
    --ncc-accent:    #6c63ff;
    --ncc-accent2:   #e040fb;
    --ncc-accent3:   #ff6584;
    --ncc-bg:        #ffffff;
    --ncc-text:      #1e1e2e;
    --ncc-text-muted:#6b7280;
    --ncc-border:    rgba(108, 99, 255, 0.12);
    --ncc-link:      #1a73e8;

    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--ncc-bg);
    border-radius: 18px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.12),
        0  6px 20px rgba(108, 99, 255, 0.1),
        0  1px  4px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--ncc-border);
    overflow: hidden;
    pointer-events: all;
    position: relative;

    /* Entry animation */
    transform: translateX(calc(100% + 40px));
    opacity: 0;
    transition:
        transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity   0.35s ease;
    will-change: transform, opacity;
}

/* Rainbow accent bar */
.ncc-card::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--ncc-accent)  0%,
        var(--ncc-accent2) 50%,
        var(--ncc-accent3) 100%
    );
    background-size: 200% 100%;
    animation: ncc-gradient-slide 3s linear infinite;
}

@keyframes ncc-gradient-slide {
    0%   { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ── Visible state ────────────────────────────────────────── */
.ncc-card.ncc-visible {
    transform: translateX(0);
    opacity: 1;
}

/* ── Dismiss animation ────────────────────────────────────── */
.ncc-card.ncc-hiding {
    transform: translateX(calc(100% + 40px));
    opacity: 0;
    transition:
        transform 0.4s cubic-bezier(0.55, 0, 1, 0.45),
        opacity   0.25s ease;
}

/* ── Header ───────────────────────────────────────────────── */
.ncc-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 0;
}

.ncc-card-icon-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ncc-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--ncc-accent), var(--ncc-accent2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
    flex-shrink: 0;
}

.ncc-card-brand {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--ncc-accent);
    opacity: 0.7;
    line-height: 1;
}

.ncc-card-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: #f5f4ff;
    color: var(--ncc-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    flex-shrink: 0;
    outline: none;
}
.ncc-card-close:hover {
    background: #fee2e2;
    color: #dc2626;
    transform: scale(1.1);
}
.ncc-card-close:focus-visible {
    box-shadow: 0 0 0 3px rgba(108,99,255,0.3);
}

/* ── Body ─────────────────────────────────────────────────── */
.ncc-card-body {
    padding: 14px 18px 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--ncc-text);
}

.ncc-card-body p   { margin: 0 0 8px; }
.ncc-card-body p:last-child { margin-bottom: 0; }
.ncc-card-body ul, .ncc-card-body ol {
    margin: 6px 0;
    padding-left: 20px;
}
.ncc-card-body li  { margin-bottom: 4px; }

.ncc-card-body strong { font-weight: 700; }
.ncc-card-body em     { font-style: italic; }

/* ── Hyperlinks — bold, blue, new tab ─────────────────────── */
.ncc-card-body a {
    color: var(--ncc-link) !important;
    font-weight: 700 !important;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
    transition: color 0.2s, opacity 0.2s;
    word-break: break-word;
}
.ncc-card-body a:hover {
    color: #0d47a1 !important;
    opacity: 0.85;
}

/* ── Countdown ────────────────────────────────────────────── */
.ncc-countdown {
    margin: 14px 18px 0;
    padding: 12px 14px;
    background: linear-gradient(135deg, #f5f0ff 0%, #fff0fb 100%);
    border-radius: 12px;
    border: 1px solid #e8d8ff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ncc-countdown-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ncc-countdown-icon { font-size: 14px; }

.ncc-countdown-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--ncc-accent);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.ncc-countdown-units {
    display: flex;
    align-items: flex-end;
    gap: 4px;
}

.ncc-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.ncc-unit-num {
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    color: var(--ncc-accent);
    font-variant-numeric: tabular-nums;
    letter-spacing: -1px;
    min-width: 2ch;
    text-align: center;
    display: block;
    transition: transform 0.15s;
}

.ncc-unit-num.ncc-tick {
    animation: ncc-tick-flip 0.2s ease;
}

@keyframes ncc-tick-flip {
    0%   { transform: scaleY(0.5); opacity: 0.4; }
    100% { transform: scaleY(1);   opacity: 1; }
}

.ncc-unit-label {
    font-size: 9px;
    font-weight: 600;
    color: var(--ncc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.ncc-unit-sep {
    font-size: 22px;
    font-weight: 800;
    color: #d8caff;
    line-height: 1;
    margin-bottom: 14px;
    padding: 0 1px;
}

/* ── Footer ───────────────────────────────────────────────── */
.ncc-card-foot {
    padding: 12px 18px 16px;
    display: flex;
    align-items: center;
    border-top: 1px solid #f5f3ff;
    margin-top: 14px;
}

.ncc-dismiss-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.ncc-dismiss-wrap input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--ncc-accent);
    cursor: pointer;
    flex-shrink: 0;
    border-radius: 4px;
}

.ncc-dismiss-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--ncc-text-muted);
    line-height: 1.3;
    transition: color 0.15s;
}
.ncc-dismiss-wrap:hover .ncc-dismiss-label { color: var(--ncc-accent); }

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 540px) {
    #ncc-mount {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        padding: 0;
        gap: 0;
    }

    .ncc-card {
        border-radius: 20px 20px 0 0;
        transform: translateY(110%);
        box-shadow:
            0 -8px 40px rgba(0, 0, 0, 0.14),
            0 -2px 10px rgba(108, 99, 255, 0.1);
    }

    .ncc-card.ncc-visible {
        transform: translateY(0);
    }

    .ncc-card.ncc-hiding {
        transform: translateY(110%);
        transition:
            transform 0.4s cubic-bezier(0.55, 0, 1, 0.45),
            opacity   0.3s ease;
    }
}

@media (min-width: 541px) and (max-width: 760px) {
    #ncc-mount {
        width: calc(100vw - 40px);
        max-width: 380px;
    }
}

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .ncc-card,
    .ncc-card.ncc-visible,
    .ncc-card.ncc-hiding {
        transition: opacity 0.3s ease !important;
        transform: none !important;
    }
    .ncc-card::before { animation: none !important; }
    .ncc-unit-num.ncc-tick { animation: none !important; }
}
