/**
 * CobraLeds Cookie Consent Premium Stylesheet
 */

:root,
#cl-cookie-banner,
#cl-cookie-floating-trigger {
    --cl-cookie-bg: rgba(18, 18, 20, 0.95);
    --cl-cookie-border: rgba(255, 255, 255, 0.08);
    --cl-cookie-text: #ffffff;
    --cl-cookie-text-muted: #a1a1aa;
    --cl-cookie-primary: #27f08a;
    --cl-cookie-primary-hover: #1cdb77;
    --cl-cookie-primary-glow: rgba(39, 240, 138, 0.25);
    --cl-cookie-danger: #ef4444;
    --cl-cookie-danger-hover: #dc2626;
    --cl-cookie-secondary: #27272a;
    --cl-cookie-secondary-hover: #3f3f46;
}

.cl-cookie-banner {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    max-width: 560px;
    z-index: 999999;
    background: var(--cl-cookie-bg);
    border: 1px solid var(--cl-cookie-border);
    border-radius: 1.25rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--cl-cookie-text);
    padding: 1.75rem;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    transform: translateY(0);
    opacity: 1;
    box-sizing: border-box;
}

.cl-cookie-banner--hidden {
    transform: translateY(100px) scale(0.95);
    opacity: 0;
    pointer-events: none;
}

.cl-cookie-banner__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.cl-cookie-banner__icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cl-cookie-banner__icon-svg {
    width: 24px;
    height: 24px;
    color: var(--cl-cookie-primary);
    filter: drop-shadow(0 0 4px var(--cl-cookie-primary-glow));
}

.cl-cookie-banner__title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: var(--cl-cookie-text);
    letter-spacing: -0.01em;
}

.cl-cookie-banner__body {
    margin-bottom: 1.5rem;
}

.cl-cookie-banner__text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--cl-cookie-text-muted);
    margin: 0;
}

.cl-cookie-banner__link {
    color: var(--cl-cookie-primary);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.cl-cookie-banner__link:hover {
    color: var(--cl-cookie-primary-hover);
}

.cl-cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.cl-cookie-btn {
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

#cl-cookie-banner .cl-cookie-btn--secondary,
#cl-cookie-banner .cl-cookie-btn--secondary:not(:hover) {
    background: #27272a !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

#cl-cookie-banner .cl-cookie-btn--secondary:hover {
    background: #3f3f46 !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

#cl-cookie-banner .cl-cookie-btn--danger,
#cl-cookie-banner .cl-cookie-btn--danger:not(:hover) {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    box-shadow: none !important;
}

#cl-cookie-banner .cl-cookie-btn--danger:hover {
    background: #ef4444 !important;
    color: #ffffff !important;
}

#cl-cookie-banner .cl-cookie-btn--primary,
#cl-cookie-banner .cl-cookie-btn--primary:not(:hover) {
    background: #27f08a !important;
    color: #0c0a09 !important;
    border: none !important;
    box-shadow: none !important;
}

#cl-cookie-banner .cl-cookie-btn--primary:hover {
    background: #1cdb77 !important;
    color: #0c0a09 !important;
}

.cl-cookie-btn--hidden {
    display: none !important;
}

.cl-cookie-preferences {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.85rem;
    border: 1px solid var(--cl-cookie-border);
    margin-bottom: 1.5rem;
    max-height: 250px;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.cl-cookie-preferences--hidden {
    display: none !important;
}

.cl-cookie-preferences__item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cl-cookie-preferences__item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.cl-cookie-preferences__title-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cl-cookie-preferences__title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--cl-cookie-text);
}

.cl-cookie-preferences__badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 0.35rem;
}

.cl-cookie-preferences__badge--required {
    background: rgba(255, 255, 255, 0.08);
    color: var(--cl-cookie-text-muted);
}

.cl-cookie-preferences__desc {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--cl-cookie-text-muted);
    margin: 0;
}

.cl-cookie-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
}

.cl-cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cl-cookie-switch__slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--cl-cookie-secondary);
    border: 1px solid var(--cl-cookie-border);
    transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 34px;
}

.cl-cookie-switch__slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: var(--cl-cookie-text-muted);
    transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 50%;
}

.cl-cookie-switch input:checked + .cl-cookie-switch__slider {
    background-color: var(--cl-cookie-primary);
    border-color: var(--cl-cookie-primary);
}

.cl-cookie-switch input:checked + .cl-cookie-switch__slider:before {
    transform: translateX(16px);
    background-color: #0c0a09;
}

.cl-cookie-floating-trigger {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    left: auto;
    z-index: 999998;
    background: rgba(18, 18, 20, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #a1a1aa;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0 !important;
    box-sizing: border-box !important;
    outline: none !important;
}

.cl-cookie-floating-trigger:hover {
    color: #27f08a;
    border-color: #27f08a !important;
    box-shadow: 0 0 12px rgba(39, 240, 138, 0.25);
    transform: scale(1.08) rotate(30deg);
}

.cl-cookie-floating-trigger__svg {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease, color 0.3s ease;
    display: block;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .cl-cookie-banner {
        bottom: 0;
        left: 0;
        right: 0;
        max-width: 100%;
        border-radius: 1.25rem 1.25rem 0 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        padding: 1.5rem;
    }
    .cl-cookie-floating-trigger {
        bottom: 1.25rem;
        right: 1.25rem;
        left: auto;
        width: 38px;
        height: 38px;
    }
    .cl-cookie-banner__actions {
        flex-direction: column;
    }
    .cl-cookie-btn {
        width: 100%;
        text-align: center;
    }
}

/* Quando as preferências estão abertas, esconde o texto principal no mobile para economizar espaço */
@media (max-width: 640px) {
    .cl-cookie-banner--preferences-open .cl-cookie-banner__body {
        display: none !important;
    }
}

/* Custom styling to make the theme's privacy badges interactive */
.clx-privacy-pill {
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}
.clx-privacy-pill:hover {
    filter: brightness(1.2) !important;
    box-shadow: 0 0 8px rgba(39, 240, 138, 0.2) !important;
}
