/* BANNER UI */
@keyframes wrapup-cookie-slide-up {
    0% {
        opacity: 0;
        margin-bottom: -40px;
    }
    100% {
        opacity: 1;
        margin-bottom: 0;
    }
}

@keyframes wrapup-cookie-fade-scale {
    0% {
        opacity: 0;
        transform: translate(-50%, -46%) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes wrapup-backdrop-fade-in {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

#wrapup-cookie-banner-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 9999998 !important;
    pointer-events: auto;
    animation: wrapup-backdrop-fade-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: opacity 0.3s ease;
}

#wrapup-cookie-banner {
    position: fixed;
    bottom: 20px;
    width: 33.333%;
    min-width: 320px;
    max-width: 650px;
    background: #ffffff;
    color: #1d2327;
    padding: 0;
    border-radius: 12px;
    box-sizing: border-box;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 9999999 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    border: 1px solid #e0e0e0;
    animation: wrapup-cookie-slide-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#wrapup-cookie-banner.wrapup-cookie-pos-left {
    left: 20px;
    right: auto;
}

#wrapup-cookie-banner.wrapup-cookie-pos-center {
    left: 50%;
    transform: translateX(-50%);
    right: auto;
}

#wrapup-cookie-banner.wrapup-cookie-pos-right {
    right: 20px;
    left: auto;
}

#wrapup-cookie-banner.wrapup-cookie-pos-full {
    left: 20px;
    right: 20px;
    width: calc(100% - 40px) !important;
    max-width: none !important;
}

#wrapup-cookie-banner.wrapup-cookie-pos-middle {
    top: 50%;
    left: 50%;
    bottom: auto;
    right: auto;
    transform: translate(-50%, -50%);
    max-height: 90vh;
    overflow-y: auto;
    animation: wrapup-cookie-fade-scale 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (max-width: 480px) {
    #wrapup-cookie-banner:not(.wrapup-cookie-pos-full) {
        width: calc(100% - 40px) !important;
        min-width: 0 !important;
    }
}

@media (min-width: 481px) {
    #wrapup-cookie-banner.wrapup-cookie-pos-full .wrapup-cookie-actions {
        justify-content: flex-start;
    }
    #wrapup-cookie-banner.wrapup-cookie-pos-full .wrapup-cookie-btn {
        flex: 0 1 auto;
        min-width: 180px;
        padding: 12px 24px;
    }
    #wrapup-cookie-banner.wrapup-cookie-pos-full .wrapup-cookie-btn.btn-accept,
    #wrapup-cookie-banner.wrapup-cookie-pos-full .wrapup-cookie-btn.btn-accept-neutral {
        margin-left: auto;
    }
}

.wrapup-cookie-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #eaeaea;
}

.wrapup-cookie-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    gap: 20px;
    padding: 20px;
}

.wrapup-cookie-text {
    flex: 1;
}

.wrapup-cookie-header img {
    height: 24px;
    width: auto;
}

.wrapup-cookie-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

#wrapup-cookie-banner p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

#wrapup-cookie-banner a {
    color: #000;
    text-decoration: underline;
}

.wrapup-privacy-link {
    display: inline-block;
    margin-top: 10px;
}

.wrapup-cookie-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.wrapup-cookie-btn {
    flex: 1;
    text-align: center;
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 12px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}

/* Subtle hover state for all non-accept buttons in light mode (replaces faded accent) */
.wrapup-cookie-btn:hover {
    background: #222222 !important;
    color: #ffffff !important;
    opacity: 1 !important;
}

.wrapup-cookie-btn.btn-accept {
    background: var(--wrapup-accent-color, #00e5a8) !important;
    color: var(--wrapup-accent-text-color, #000000) !important;
    text-transform: uppercase;
}

.wrapup-cookie-btn.btn-accept:hover {
    background: var(--wrapup-accent-color, #00e5a8) !important;
    color: var(--wrapup-accent-text-color, #000000) !important;
    opacity: 0.85 !important;
}

/* Neutral Accept button (when accent color is not used) - text is green (#00e5a8) like other accept buttons */
.wrapup-cookie-btn.btn-accept-neutral {
    background: #000000 !important;
    color: #00e5a8 !important;
    text-transform: uppercase;
}

.wrapup-cookie-btn.btn-accept-neutral:hover {
    background: #222222 !important;
    color: #00e5a8 !important;
    opacity: 1 !important;
}

/* MODAL UI */
#wrapup-cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 10000000 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#wrapup-cookie-modal-overlay.has-overlay {
    background: rgba(0, 0, 0, 0.5) !important;
}

#wrapup-cookie-modal-overlay:not(.has-overlay) {
    background: transparent !important;
}

#wrapup-cookie-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

#wrapup-cookie-modal {
    background: #fff;
    width: 90%;
    max-width: 650px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    max-height: 85vh; /* Reduced slightly to ensure overlay clicking area */
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

@media (max-width: 600px) {
    #wrapup-cookie-modal {
        max-height: 75vh;
    }
}

@media (max-width: 600px) {
    #wrapup-cookie-modal {
        max-height: 75vh;
    }
}

#wrapup-cookie-modal-overlay.active #wrapup-cookie-modal {
    transform: translateY(0);
}

.wrapup-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eaeaea;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.wrapup-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.wrapup-modal-body {
    padding: 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
    flex: 1 1 auto;
    min-height: 0;
}

.wrapup-modal-intro {
    font-size: 14px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 25px;
    word-break: break-word;
}

.wrapup-modal-intro p {
    margin: 0 0 12px 0;
    line-height: 1.6;
}

.wrapup-modal-intro p:last-child {
    margin-bottom: 0;
}

.wrapup-cookie-category {
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 20px;
    margin-bottom: 20px;
}
.wrapup-cookie-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.wrapup-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.wrapup-category-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.wrapup-always-active {
    color: #2e7d32;
    font-size: 13px;
    font-weight: 600;
}

.wrapup-category-desc {
    font-size: 13px;
    line-height: 1.5;
    color: #666;
    margin: 0 0 10px 0;
}

.wrapup-cookie-names {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 4px;
    display: inline-block;
    font-family: monospace;
}

.wrapup-cookie-names-empty {
    background: transparent;
    color: #888;
}

.wrapup-cookie-names-active {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.wrapup-modal-footer {
    padding: 20px;
    border-top: 1px solid #eaeaea;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.wrapup-modal-footer .wrapup-cookie-btn {
    flex: 1;
    padding: 14px;
    font-size: 13px;
}

/* TOGGLE SWITCH */
.wrapup-cookie-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.wrapup-cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.wrapup-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.wrapup-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .wrapup-toggle-slider {
    background-color: #000;
}

input:disabled + .wrapup-toggle-slider,
.wrapup-toggle-slider.wrapup-slider-disabled {
    background-color: #e0e0e0;
    cursor: not-allowed;
    opacity: 0.6;
}

input:checked:disabled + .wrapup-toggle-slider,
input:checked + .wrapup-toggle-slider.wrapup-slider-disabled {
    background-color: #b0b0b0;
}

input:checked + .wrapup-toggle-slider:before {
    transform: translateX(20px);
}

@media (max-width: 768px) {
    .wrapup-cookie-body {
        flex-direction: column;
        align-items: stretch;
    }
    
    .wrapup-cookie-actions, .wrapup-modal-footer {
        flex-direction: column;
    }
    
    .wrapup-cookie-actions {
        width: 100%;
    }
    
    .wrapup-cookie-btn {
        width: 100%;
        text-align: center;
    }
}

/* DARK THEME OVERRIDES */
#wrapup-cookie-banner.wrapup-cookie-dark,
#wrapup-cookie-modal-overlay.wrapup-cookie-dark #wrapup-cookie-modal {
    background: #151515;
    color: #ffffff;
    border-color: #333333;
}

#wrapup-cookie-banner.wrapup-cookie-dark h2,
#wrapup-cookie-modal-overlay.wrapup-cookie-dark h2,
#wrapup-cookie-modal-overlay.wrapup-cookie-dark h3 {
    color: #ffffff !important;
}

#wrapup-cookie-banner.wrapup-cookie-dark p,
#wrapup-cookie-modal-overlay.wrapup-cookie-dark .wrapup-modal-intro {
    color: #cccccc;
}

#wrapup-cookie-banner.wrapup-cookie-dark a {
    color: #ffffff;
}

#wrapup-cookie-banner.wrapup-cookie-dark .wrapup-cookie-header,
#wrapup-cookie-modal-overlay.wrapup-cookie-dark .wrapup-modal-header,
#wrapup-cookie-modal-overlay.wrapup-cookie-dark .wrapup-cookie-category,
#wrapup-cookie-modal-overlay.wrapup-cookie-dark .wrapup-modal-footer {
    border-color: #333333;
}

#wrapup-cookie-modal-overlay.wrapup-cookie-dark .wrapup-category-desc {
    color: #aaaaaa;
}

#wrapup-cookie-modal-overlay.wrapup-cookie-dark .wrapup-cookie-names-empty {
    background: #222222;
    color: #777777;
}

#wrapup-cookie-modal-overlay.wrapup-cookie-dark .wrapup-cookie-names-active {
    background: rgba(0, 229, 168, 0.1);
    color: #00e5a8;
    border: 1px solid rgba(0, 229, 168, 0.2);
}

#wrapup-cookie-modal-overlay.wrapup-cookie-dark .wrapup-always-active {
    color: #4caf50;
}

#wrapup-cookie-banner.wrapup-cookie-dark .wrapup-cookie-btn,
#wrapup-cookie-modal-overlay.wrapup-cookie-dark .wrapup-cookie-btn {
    background: #2a2a2a !important;
    color: #ffffff !important;
}

#wrapup-cookie-banner.wrapup-cookie-dark .wrapup-cookie-btn:hover,
#wrapup-cookie-modal-overlay.wrapup-cookie-dark .wrapup-cookie-btn:hover {
    background: #333333 !important;
    color: #ffffff !important;
    opacity: 1 !important;
}

#wrapup-cookie-banner.wrapup-cookie-dark .wrapup-cookie-btn.btn-accept,
#wrapup-cookie-modal-overlay.wrapup-cookie-dark .wrapup-cookie-btn.btn-accept {
    background: var(--wrapup-accent-color, #00e5a8) !important;
    color: var(--wrapup-accent-text-color, #000000) !important;
    text-transform: uppercase;
}

#wrapup-cookie-banner.wrapup-cookie-dark .wrapup-cookie-btn.btn-accept:hover,
#wrapup-cookie-modal-overlay.wrapup-cookie-dark .wrapup-cookie-btn.btn-accept:hover {
    background: var(--wrapup-accent-color, #00e5a8) !important;
    color: var(--wrapup-accent-text-color, #000000) !important;
    opacity: 0.85 !important;
}

#wrapup-cookie-banner.wrapup-cookie-dark .wrapup-cookie-btn.btn-accept-neutral,
#wrapup-cookie-modal-overlay.wrapup-cookie-dark .wrapup-cookie-btn.btn-accept-neutral {
    background: #2a2a2a !important;
    color: #00e5a8 !important;
    text-transform: uppercase;
}

#wrapup-cookie-banner.wrapup-cookie-dark .wrapup-cookie-btn.btn-accept-neutral:hover,
#wrapup-cookie-modal-overlay.wrapup-cookie-dark .wrapup-cookie-btn.btn-accept-neutral:hover {
    background: #333333 !important;
    color: #00e5a8 !important;
    opacity: 1 !important;
}

#wrapup-cookie-modal-overlay.wrapup-cookie-dark .wrapup-toggle-slider {
    background-color: #444;
}

#wrapup-cookie-modal-overlay.wrapup-cookie-dark input:checked + .wrapup-toggle-slider {
    background-color: #00e5a8;
}

/* IFRAME BLOCKER (Universal & Builder-Agnostic) */
.wrapup-blocked-iframe-placeholder {
    position: relative;
    display: block;
    max-width: 100%;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden !important;
    background: #000;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* For legacy wrappers that use padding-bottom responsive hacks */
.elementor-fit-aspect-ratio > .wrapup-blocked-iframe-placeholder,
.fluid-width-video-wrapper > .wrapup-blocked-iframe-placeholder,
.elementor-wrapper-iframe > .wrapup-blocked-iframe-placeholder {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

.wrapup-blocked-iframe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    z-index: 10;
    background: rgba(20, 20, 20, 0.95);
    border-radius: inherit;
    overflow: hidden;
}

.wrapup-blocked-iframe-content {
    background: #ffffff;
    color: #111111;
    padding: 18px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    max-width: 90%;
    box-sizing: border-box;
}

.wrapup-blocked-iframe-content p {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    color: #444 !important;
    font-size: 14px !important;
    margin: 0 0 16px 0 !important;
    padding: 0 !important;
    line-height: 1.5 !important;
}

.wrapup-blocked-iframe-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.wrapup-blocked-iframe-actions .wrapup-cookie-btn {
    flex: 0 1 auto;
    min-width: 130px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    border: none;
    cursor: pointer;
    background: #000000 !important;
    color: #ffffff !important;
    box-sizing: border-box;
    transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.wrapup-blocked-iframe-actions .wrapup-cookie-btn:hover {
    background: #222222 !important;
    color: #ffffff !important;
    opacity: 1 !important;
}

.wrapup-blocked-iframe-actions .wrapup-cookie-btn.btn-accept {
    background: var(--wrapup-accent-color, #00e5a8) !important;
    color: var(--wrapup-accent-text-color, #000000) !important;
    text-transform: uppercase;
}

.wrapup-blocked-iframe-actions .wrapup-cookie-btn.btn-accept:hover {
    background: var(--wrapup-accent-color, #00e5a8) !important;
    color: var(--wrapup-accent-text-color, #000000) !important;
    opacity: 0.85 !important;
}

.wrapup-blocked-iframe-actions .wrapup-cookie-btn.btn-accept-neutral {
    background: #000000 !important;
    color: #00e5a8 !important;
    text-transform: uppercase;
}

.wrapup-blocked-iframe-actions .wrapup-cookie-btn.btn-accept-neutral:hover {
    background: #222222 !important;
    color: #00e5a8 !important;
    opacity: 1 !important;
}

/* Dark mode support for blocked iframe card and buttons */
.wrapup-blocked-iframe-placeholder.wrapup-cookie-dark .wrapup-blocked-iframe-content {
    background: #1a1a1a;
    color: #ffffff;
    border: 1px solid #333333;
}

.wrapup-blocked-iframe-placeholder.wrapup-cookie-dark .wrapup-blocked-iframe-content p {
    color: #cccccc !important;
}

.wrapup-blocked-iframe-placeholder.wrapup-cookie-dark .wrapup-blocked-iframe-actions .wrapup-cookie-btn {
    background: #2a2a2a !important;
    color: #ffffff !important;
}

.wrapup-blocked-iframe-placeholder.wrapup-cookie-dark .wrapup-blocked-iframe-actions .wrapup-cookie-btn:hover {
    background: #333333 !important;
    color: #ffffff !important;
    opacity: 1 !important;
}

.wrapup-blocked-iframe-placeholder.wrapup-cookie-dark .wrapup-blocked-iframe-actions .wrapup-cookie-btn.btn-accept {
    background: var(--wrapup-accent-color, #00e5a8) !important;
    color: var(--wrapup-accent-text-color, #000000) !important;
    text-transform: uppercase;
}

.wrapup-blocked-iframe-placeholder.wrapup-cookie-dark .wrapup-blocked-iframe-actions .wrapup-cookie-btn.btn-accept:hover {
    background: var(--wrapup-accent-color, #00e5a8) !important;
    color: var(--wrapup-accent-text-color, #000000) !important;
    opacity: 0.85 !important;
}

.wrapup-blocked-iframe-placeholder.wrapup-cookie-dark .wrapup-blocked-iframe-actions .wrapup-cookie-btn.btn-accept-neutral {
    background: #2a2a2a !important;
    color: #00e5a8 !important;
    text-transform: uppercase;
}

.wrapup-blocked-iframe-placeholder.wrapup-cookie-dark .wrapup-blocked-iframe-actions .wrapup-cookie-btn.btn-accept-neutral:hover {
    background: #333333 !important;
    color: #00e5a8 !important;
    opacity: 1 !important;
}