/**
 * Cookie Notice Styles
 * 
 * @package Starter_starter
 */

/* ==========================================================================
   Cookie Notice Container
   ========================================================================== */

.cookie-notice {
    --cookie-bg: #FFFFFF;
    --cookie-text: #1E293B;
    --cookie-accent: #10B981;
    
    position: fixed;
    z-index: 9998;
    padding: 1rem var(--starter-container-padding);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.cookie-notice:not([hidden]) {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Position variants */
.cookie-notice--bottom {
    left: 0;
    right: 0;
    bottom: 0;
}

.cookie-notice--bottom-left {
    left: 1rem;
    bottom: 1rem;
    right: auto;
    max-width: 420px;
    border-radius: var(--starter-radius-lg);
}

.cookie-notice--bottom-right {
    right: 1rem;
    bottom: 1rem;
    left: auto;
    max-width: 420px;
    border-radius: var(--starter-radius-lg);
}

@media (max-width: 480px) {
    .cookie-notice--bottom-left,
    .cookie-notice--bottom-right {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
}

/* ==========================================================================
   Glass Background
   ========================================================================== */

.cookie-notice__glass {
    position: absolute;
    inset: 0;
    background: var(--cookie-bg);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    box-shadow: 
        0 -4px 32px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: -1;
}

.cookie-notice--bottom .cookie-notice__glass {
    border-radius: 0;
}

.cookie-notice--bottom-left .cookie-notice__glass,
.cookie-notice--bottom-right .cookie-notice__glass {
    border-radius: var(--starter-radius-lg);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   Inner Container
   ========================================================================== */

.cookie-notice__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: var(--starter-container-max);
    margin: 0 auto;
}

.cookie-notice--bottom-left .cookie-notice__inner,
.cookie-notice--bottom-right .cookie-notice__inner {
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .cookie-notice__inner {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
}

/* ==========================================================================
   Icon
   ========================================================================== */

.cookie-notice__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #FDE68A 0%, #F59E0B 100%);
    border-radius: 50%;
    color: white;
    animation: cookie-wobble 3s ease-in-out infinite;
}

.cookie-notice__icon svg {
    width: 20px;
    height: 20px;
}

@keyframes cookie-wobble {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

@media (max-width: 768px) {
    .cookie-notice__icon {
        display: none;
    }
}

/* ==========================================================================
   Text
   ========================================================================== */

.cookie-notice__text {
    flex: 1;
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--cookie-text);
}

.cookie-notice--bottom-left .cookie-notice__text,
.cookie-notice--bottom-right .cookie-notice__text {
    flex: 1 1 100%;
    font-size: 0.875rem;
}

.cookie-notice__link {
    color: var(--cookie-accent);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 2px;
    transition: text-decoration-color 0.2s ease;
}

.cookie-notice__link:hover {
    text-decoration-color: var(--cookie-accent);
    color: var(--cookie-accent);
}

/* ==========================================================================
   Button
   ========================================================================== */

.cookie-notice__btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.5rem;
    font-family: var(--starter-heading-font);
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    background: var(--cookie-accent);
    border: 2px solid var(--cookie-accent);
    border-radius: var(--starter-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-notice__btn:hover {
    background: color-mix(in srgb, var(--cookie-accent) 90%, black);
    border-color: color-mix(in srgb, var(--cookie-accent) 90%, black);
    transform: translateY(-1px);
}

.cookie-notice__btn:active {
    transform: translateY(0);
}

.cookie-notice--bottom-left .cookie-notice__btn,
.cookie-notice--bottom-right .cookie-notice__btn {
    width: 100%;
}

@media (max-width: 768px) {
    .cookie-notice__btn {
        width: 100%;
    }
}

/* ==========================================================================
   Animation Out
   ========================================================================== */

.cookie-notice.is-closing {
    animation: cookie-close 0.4s ease forwards;
}

@keyframes cookie-close {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .cookie-notice,
    .cookie-notice__icon {
        animation: none;
        transition: opacity 0.01ms;
    }
}
