/* ============================================================
   Blog The Tech — Cookie Consent Banner
   assets/cookie.css
   ============================================================ */

.btt-cookie {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(calc(100% + 40px));
    z-index: 9999;
    width: calc(100% - 32px);
    max-width: 660px;

    /* Light surface — editorial, not the usual dark cookie bar */
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 18px;
    box-shadow:
        0 4px 6px rgba(13,17,23,.04),
        0 12px 40px rgba(13,17,23,.10),
        0 0 0 1px rgba(13,17,23,.03);

    opacity: 0;
    transition:
        transform 0.38s cubic-bezier(0.16, 1, 0.3, 1),
        opacity   0.38s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

/* Thin blue accent line at the top */
.btt-cookie::before {
    content: '';
    position: absolute;
    top: 0; left: 20px; right: 20px;
    height: 2px;
    background: linear-gradient(90deg, #1d4ed8, #3b82f6 60%, transparent);
    border-radius: 0 0 2px 2px;
    opacity: .7;
}

/* Shown state */
.btt-cookie.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ── Inner layout ─────────────────────────────────────────── */
.btt-cookie__inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    flex-wrap: wrap;
    position: relative;
}

/* ── Cookie icon ──────────────────────────────────────────── */
.btt-cookie__icon {
    font-size: 22px;
    flex-shrink: 0;
    line-height: 1;
}

/* ── Text ─────────────────────────────────────────────────── */
.btt-cookie__text {
    flex: 1;
    min-width: 200px;
}

.btt-cookie__title {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: #0d1117;
    margin: 0 0 3px;
    line-height: 1.2;
    letter-spacing: -.1px;
}

.btt-cookie__desc {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 12px;
    color: #64748b;
    line-height: 1.65;
    margin: 0;
}

.btt-cookie__desc a {
    color: #1d4ed8;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
    transition: color .15s ease;
}

.btt-cookie__desc a:hover {
    color: #1e40af;
}

/* ── Action buttons ───────────────────────────────────────── */
.btt-cookie__actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    align-items: center;
}

.btt-cookie__btn {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .18s ease, color .18s ease,
                border-color .18s ease, box-shadow .18s ease;
    white-space: nowrap;
    letter-spacing: .2px;
}

.btt-cookie__btn--decline {
    background: transparent;
    color: #64748b;
    border: 1.5px solid #e8eaed;
}

.btt-cookie__btn--decline:hover {
    background: #f7f8fa;
    color: #0d1117;
    border-color: #d1d5db;
}

.btt-cookie__btn--accept {
    background: #0d1117;
    color: #ffffff;
    border: 1.5px solid #0d1117;
}

.btt-cookie__btn--accept:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    box-shadow: 0 4px 14px rgba(29,78,216,.25);
}

/* ── Close button ─────────────────────────────────────────── */
.btt-cookie__close {
    position: absolute;
    top: 10px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #e8eaed;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
    flex-shrink: 0;
}

.btt-cookie__close:hover {
    background: #f7f8fa;
    color: #0d1117;
    border-color: #d1d5db;
}

/* ── Focus rings ──────────────────────────────────────────── */
.btt-cookie__btn:focus-visible,
.btt-cookie__close:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 3px;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 540px) {
    .btt-cookie {
        bottom: 12px;
        border-radius: 14px;
    }

    .btt-cookie__inner {
        padding: 16px 16px 14px;
        gap: 10px;
    }

    .btt-cookie__icon {
        display: none;
    }

    .btt-cookie__actions {
        width: 100%;
        justify-content: flex-end;
    }

    .btt-cookie__btn {
        flex: 1;
        text-align: center;
        padding: 9px 10px;
    }
}

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .btt-cookie {
        transition: opacity 0.2s ease;
        transform: translateX(-50%) translateY(0);
    }

    .btt-cookie.is-visible {
        opacity: 1;
    }
}