/* ========================================
   COOKIE CONSENT BANNER
   Glassmorphism bottom bar matching Datapolus design
   ======================================== */

.cookie-consent {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(calc(100% + 3rem));
    z-index: 9999;
    max-width: 620px;
    width: calc(100% - 2rem);
    background: rgba(17, 24, 39, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.125rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(77, 142, 255, 0.06),
        0 0 100px rgba(77, 142, 255, 0.04);
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

/* Accent glow line on top */
.cookie-consent::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(77, 142, 255, 0.3) 20%,
        rgba(0, 212, 255, 0.4) 50%,
        rgba(77, 142, 255, 0.3) 80%,
        transparent
    );
    border-radius: 1px;
}

/* Visible state — slides up */
.cookie-consent--visible {
    transform: translateX(-50%) translateY(0);
}

/* ========================================
   COOKIE ICON
   ======================================== */

.cookie-consent__icon-wrapper {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(77, 142, 255, 0.1);
    border-radius: 14px;
    position: relative;
}

.cookie-consent__icon {
    font-size: 24px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtle pulse on the icon wrapper when banner first appears */
.cookie-consent--visible .cookie-consent__icon-wrapper {
    animation: cookie-icon-glow 2s ease-out 0.6s;
}

@keyframes cookie-icon-glow {
    0% { box-shadow: 0 0 0 0 rgba(77, 142, 255, 0.3); }
    60% { box-shadow: 0 0 20px 4px rgba(77, 142, 255, 0.15); }
    100% { box-shadow: 0 0 0 0 rgba(77, 142, 255, 0); }
}

/* ========================================
   TEXT
   ======================================== */

.cookie-consent__text {
    flex: 1;
    min-width: 0;
}

.cookie-consent__title {
    color: var(--text-primary);
    font-size: 0.925rem;
    font-weight: 600;
    margin: 0 0 0.15rem;
    line-height: 1.3;
}

.cookie-consent__desc {
    color: var(--text-secondary);
    font-size: 0.825rem;
    margin: 0;
    line-height: 1.4;
}

.cookie-consent__link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
}

.cookie-consent__link:hover {
    color: var(--accent-secondary);
}

/* ========================================
   BUTTONS
   ======================================== */

.cookie-consent__actions {
    display: flex;
    gap: 0.625rem;
    flex-shrink: 0;
}

.cookie-consent__btn {
    padding: 0.625rem 1.25rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    white-space: nowrap;
    line-height: 1.4;
}

.cookie-consent__btn--accept {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 16px rgba(77, 142, 255, 0.3);
}

.cookie-consent__btn--accept:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(77, 142, 255, 0.45);
}

.cookie-consent__btn--reject {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.cookie-consent__btn--reject:hover {
    background: var(--bg-card);
    border-color: var(--border-hover);
}

/* ========================================
   LIGHT THEME
   ======================================== */

[data-theme="light"] .cookie-consent {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(77, 142, 255, 0.12);
}

[data-theme="light"] .cookie-consent::before {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(77, 142, 255, 0.25) 20%,
        rgba(0, 212, 255, 0.3) 50%,
        rgba(77, 142, 255, 0.25) 80%,
        transparent
    );
}

[data-theme="light"] .cookie-consent__icon-wrapper {
    background: rgba(77, 142, 255, 0.08);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 640px) {
    .cookie-consent {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 1.125rem 1.25rem;
        gap: 0.75rem;
        bottom: 1rem;
        border-radius: 16px;
        max-width: calc(100% - 1.5rem);
    }

    .cookie-consent::before {
        left: 16px;
        right: 16px;
    }

    .cookie-consent__icon-wrapper {
        align-self: center;
    }

    .cookie-consent__text {
        text-align: center;
    }

    .cookie-consent__actions {
        width: 100%;
        justify-content: stretch;
    }

    .cookie-consent__btn {
        flex: 1;
        text-align: center;
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent {
        transition: none;
    }

    .cookie-consent--visible .cookie-consent__icon-wrapper {
        animation: none;
    }
}
