/**
 * AT Lightweight GA4 Consent
 * Minimal, unobtrusive banner styles
 */

/* Banner container - fixed positioning to prevent CLS */
/* Using theme colors: Dark Neutral #14082E */
.at-ga4-consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 999999;
    background: #14082E; /* Dark Neutral - solid, no transparency */
    border-top: 1px solid rgba(55, 34, 99, 0.6); /* Secondary #372263 */
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
    padding: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100%);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(10px);
}

.at-ga4-consent-banner.at-ga4-consent-top {
    top: 0;
    bottom: auto;
    border-top: none;
    border-bottom: 1px solid rgba(55, 34, 99, 0.4); /* Secondary #372263 with transparency */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(-100%);
}

.at-ga4-consent-banner.at-ga4-consent-bottom {
    bottom: 0;
    top: auto;
}

/* Visible state */
.at-ga4-consent-banner.at-ga4-consent-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Respect reduced motion */
.at-ga4-consent-reduced-motion .at-ga4-consent-banner,
.at-ga4-consent-reduced-motion .at-ga4-consent-banner.at-ga4-consent-visible {
    transition: none;
}

/* Inner container */
.at-ga4-consent-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Logo */
.at-ga4-consent-logo {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: block;
}

/* Text */
/* Using theme colors: Body #E6EAD9 */
.at-ga4-consent-text {
    flex: 1;
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #E6EAD9; /* Body color */
    min-width: 200px;
}

/* Buttons container */
.at-ga4-consent-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
    align-items: center;
}

/* Buttons */
.at-ga4-consent-btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    background: transparent;
    font-family: inherit;
    line-height: 1.5;
    text-align: center;
    min-width: 80px;
}

.at-ga4-consent-btn:focus {
    outline: 2px solid #06FF8F; /* Primary color */
    outline-offset: 2px;
}

.at-ga4-consent-btn:focus:not(:focus-visible) {
    outline: none;
}

/* Accept button */
/* Using theme colors: Primary #06FF8F */
.at-ga4-consent-accept {
    background: #06FF8F; /* Primary color */
    color: #14082E; /* Dark Neutral for text contrast */
    border-color: #06FF8F;
    font-weight: 600;
}

.at-ga4-consent-accept:hover {
    background: #05E67D; /* Slightly darker green */
    border-color: #05E67D;
}

.at-ga4-consent-accept:active {
    background: #04CC6B; /* Darker green */
    border-color: #04CC6B;
}

/* Reject button */
/* Using theme colors: Secondary #372263, Body #E6EAD9 */
.at-ga4-consent-reject {
    background: transparent;
    color: #E6EAD9; /* Body color */
    border-color: #372263; /* Secondary color */
}

.at-ga4-consent-reject:hover {
    background: rgba(62, 50, 90, 0.3); /* Light Neutral with transparency */
    border-color: #4A2F7A; /* Lighter Secondary */
}

.at-ga4-consent-reject:active {
    background: rgba(55, 34, 99, 0.4); /* Secondary with transparency */
    border-color: #5D3A91; /* Even lighter Secondary */
}

/* Settings link */
/* Using theme colors: Primary #06FF8F */
.at-ga4-consent-settings-link {
    color: #06FF8F; /* Primary color */
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
}

.at-ga4-consent-settings-link:hover {
    color: #05E67D; /* Slightly darker green */
    text-decoration: none;
}

.at-ga4-consent-settings-link:focus {
    outline: 2px solid #06FF8F; /* Primary color */
    outline-offset: 2px;
    border-radius: 2px;
}

/* Cookie policy link */
/* Using theme colors: Primary #06FF8F */
.at-ga4-consent-cookie-policy-link {
    color: #06FF8F; /* Primary color */
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
}

.at-ga4-consent-cookie-policy-link:hover {
    color: #05E67D; /* Slightly darker green */
    text-decoration: none;
}

.at-ga4-consent-cookie-policy-link:focus {
    outline: 2px solid #06FF8F; /* Primary color */
    outline-offset: 2px;
    border-radius: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .at-ga4-consent-banner-inner {
        padding: 1rem;
        flex-direction: column;
        align-items: stretch;
    }
    
    .at-ga4-consent-text {
        min-width: 0;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .at-ga4-consent-buttons {
        width: 100%;
        display: flex;
        gap: 0.75rem;
        justify-content: stretch;
    }
    
    .at-ga4-consent-btn {
        flex: 1 1 0;
        min-width: 0;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .at-ga4-consent-banner {
        border-top-width: 2px;
        border-top-color: #000000;
    }
    
    .at-ga4-consent-banner.at-ga4-consent-top {
        border-bottom-width: 2px;
        border-bottom-color: #000000;
    }
    
    .at-ga4-consent-text {
        color: #000000;
    }
    
    .at-ga4-consent-reject {
        border-color: #000000;
        color: #000000;
    }
}
