/**
 * Cookie Banner Styles
 * Redesigned to match ShopNex theme design system.
 *
 * @package shopnex-pro-addons
 */


/* ═══════════════════════════════════════════════════════════════
   Banner Container — Floating Card at Bottom
   ═══════════════════════════════════════════════════════════════ */

.snpa-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 99999;
    padding: 0 24px 24px;
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition-base, 0.4s cubic-bezier(0.4, 0, 0.2, 1)),
                opacity 0.35s ease,
                visibility 0.35s ease;
    pointer-events: none;
}

.snpa-cookie-banner.snpa-cookie-visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* ═══════════════════════════════════════════════════════════════
   Inner Card
   ═══════════════════════════════════════════════════════════════ */

.snpa-cookie-inner {
    position: relative;
    padding: 28px 60px 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    border-radius: var(--radius-xl, 24px);
    border: 1px solid var(--brand-border, #E8E4DF);
    box-shadow: 0 8px 40px rgba(28, 28, 28, 0.08),
                0 2px 8px rgba(28, 28, 28, 0.04);
}


/* ═══════════════════════════════════════════════════════════════
   Close Button
   ═══════════════════════════════════════════════════════════════ */

.snpa-cookie-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: var(--brand-bg, #FBF9F6);
    border: 1px solid var(--brand-border, #E8E4DF);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast, 0.2s cubic-bezier(0.4, 0, 0.2, 1));
    padding: 0;
    z-index: 2;
    color: var(--brand-muted, #6B6560);
}

.snpa-cookie-close:hover {
    background: var(--brand-dark, #1C1C1C);
    border-color: var(--brand-dark, #1C1C1C);
    color: #FFFFFF;
    transform: scale(1.05);
}

.snpa-cookie-close svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}


/* ═══════════════════════════════════════════════════════════════
   Content
   ═══════════════════════════════════════════════════════════════ */

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

.snpa-cookie-title {
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 4px;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.snpa-cookie-description {
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 0.84rem;
    line-height: 1.65;
    margin: 0;
    opacity: 0.72;
    font-weight: 300;
}


/* ═══════════════════════════════════════════════════════════════
   Cookie Icon (optional decorative element)
   ═══════════════════════════════════════════════════════════════ */

.snpa-cookie-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg, 16px);
    background: var(--brand-bg, #FBF9F6);
    border: 1px solid var(--brand-border, #E8E4DF);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-accent-warm, #B8977E);
    margin-right: 4px;
}

.snpa-cookie-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}


/* ═══════════════════════════════════════════════════════════════
   Action Buttons
   ═══════════════════════════════════════════════════════════════ */

.snpa-cookie-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.snpa-cookie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border: 1px solid transparent;
    border-radius: var(--radius-full, 9999px);
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all var(--transition-fast, 0.2s cubic-bezier(0.4, 0, 0.2, 1));
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.snpa-cookie-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(28, 28, 28, 0.12);
}

.snpa-cookie-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Accept button — primary solid style */
.snpa-cookie-accept {
    box-shadow: 0 4px 14px rgba(28, 28, 28, 0.15);
}

/* Reject button — ghost/outline style */
.snpa-cookie-reject {
    border-color: var(--brand-border, #E8E4DF);
    background: transparent !important;
}

.snpa-cookie-reject:hover {
    border-color: var(--brand-dark, #1C1C1C);
    background: var(--brand-bg, #FBF9F6) !important;
}


/* ═══════════════════════════════════════════════════════════════
   Dismiss Animation
   ═══════════════════════════════════════════════════════════════ */

.snpa-cookie-banner.snpa-cookie-dismiss {
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}


/* ═══════════════════════════════════════════════════════════════
   Responsive: 768px
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .snpa-cookie-banner {
        padding: 0 16px 16px;
    }

    .snpa-cookie-inner {
        padding: 24px 48px 24px 24px;
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        border-radius: var(--radius-lg, 16px);
    }

    .snpa-cookie-content {
        width: 100%;
    }

    .snpa-cookie-title {
        font-size: 0.92rem;
    }

    .snpa-cookie-description {
        font-size: 0.8rem;
    }

    .snpa-cookie-actions {
        width: 100%;
        gap: 8px;
    }

    .snpa-cookie-btn {
        flex: 1;
        padding: 12px 20px;
        font-size: 0.78rem;
        justify-content: center;
    }

    .snpa-cookie-close {
        top: 14px;
        right: 14px;
    }

    .snpa-cookie-icon {
        width: 36px;
        height: 36px;
    }
}


/* ═══════════════════════════════════════════════════════════════
   Responsive: 480px
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    .snpa-cookie-banner {
        padding: 0 12px 12px;
    }

    .snpa-cookie-inner {
        padding: 20px 40px 20px 20px;
        gap: 16px;
    }

    .snpa-cookie-title {
        font-size: 0.88rem;
    }

    .snpa-cookie-description {
        font-size: 0.78rem;
    }

    .snpa-cookie-close {
        width: 28px;
        height: 28px;
        top: 12px;
        right: 12px;
    }

    .snpa-cookie-close svg {
        width: 12px;
        height: 12px;
    }

    .snpa-cookie-actions {
        flex-direction: column;
    }

    .snpa-cookie-btn {
        width: 100%;
        justify-content: center;
    }

    .snpa-cookie-icon {
        width: 32px;
        height: 32px;
    }

    .snpa-cookie-icon svg {
        width: 16px;
        height: 16px;
    }
}


/* ═══════════════════════════════════════════════════════════════
   Accessibility: Reduced Motion
   ═══════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    .snpa-cookie-banner {
        transition: none;
    }

    .snpa-cookie-btn {
        transition: none;
    }

    .snpa-cookie-close {
        transition: none;
    }
}
