:root {
    --header-base-top: 0rem;
    --ticker-visible-offset: 3.125rem; 
    --font-base-size: 1rem;
}

/* --- Ticker Rahmen --- */
.kamelur-ticker {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Config-Farbe gilt immer */
    background: var(--ticker-bg-color, #000);
    color: var(--ticker-text-color, #fff);
    
    overflow: hidden;
    z-index: 1001;
    min-height: 3.125rem; 
    padding: 0.3125rem 0.375rem;
}

/* --- Navbar Logic --- */
@media (min-width: 48em) {
    html.kamelur-ticker-active .wbn-sticky-header-wrapper {
        top: calc(var(--header-base-top) + var(--ticker-visible-offset)) !important;
        transition: none !important;
    }
}

/* --- ANIMATION KEYFRAMES --- */
@keyframes kamelurPop {
    0% { opacity: 0; transform: scale(0.5); }
    60% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

/* --- ICON STYLES --- */
.kamelur-ticker-emoji-left { font-size: 1.3rem; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; margin-right: 0.35rem; }

.emoji-icon { 
    width: 1.3rem; height: 1.3rem; display: inline-block;
    opacity: 1; transform: scale(1);
    transition: all 0.2s ease-out; 
}

/* Phase 1: Rausgehen */
.kamelur-anim-out .emoji-icon { opacity: 0; transform: scale(0.5); }
/* Phase 2: Reinkommen */
.kamelur-anim-in .emoji-icon { animation: kamelurPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }

/* --- TEXT STYLES --- */
.kamelur-ticker-message {
    max-width: 100%; 
    color: inherit; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    font-weight: 700;
    
    /* --- FALLBACK FÜR ÄLTERE BROWSER (2018) --- */
    font-size: 1rem; 
    /* --- MODERN (Überschreibt das obere, wenn Browser es kann) --- */
    font-size: clamp(1rem, 1.1vw, 1.1rem); 
    
    padding: 0.1875rem 0.34375rem; 
    flex: 0 1 auto; 
    text-align: center; 
    cursor: pointer; 
    text-decoration: none !important;
    opacity: 1;
    transition: opacity 0.2s ease-out;
}

/* --- DESKTOP TEXT LÄNGE --- */
@media (min-width: 62em) { 
    .kamelur-ticker-message {
        max-width: 850px;
    }
}

.kamelur-anim-out .kamelur-ticker-message { opacity: 0; }
.kamelur-anim-in .kamelur-ticker-message { opacity: 0; animation: kamelurFadeIn 0.5s ease-out 0.1s forwards; }

@keyframes kamelurFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- Pfeile --- */
.kamelur-ticker-arrows { display: inline-flex; align-items: center; justify-content: center; margin-left: 0.35rem; }
.kamelur-ticker-arrow-left { margin-right: 0.25rem !important; }
.kamelur-ticker-arrow { width: 2rem; height: 2rem; border-radius: 50%; border: 0.0625rem solid rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.1); display: inline-flex; align-items: center; justify-content: center; padding: 0; margin: 0; cursor: pointer; color: #fff; padding-top: 0.125rem; font-size: 1.2rem; transition: background 0.2s ease; }
.kamelur-ticker-arrow span { display: block; transform: translateY(-0.0625rem); }
.kamelur-ticker-arrow:hover { background: rgba(255, 255, 255, 0.18); }

/* --- MODAL --- */
.kamelur-ticker-modal-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0, 0, 0, 0.45); display: none; align-items: center; justify-content: center; z-index: 2566666666666; padding: 1.5rem; }
.kamelur-ticker-modal-backdrop.kamelur-ticker-modal-open { display: flex; }
.kamelur-ticker-modal { position: relative; margin: 0; max-width: 32.5rem; width: 100%; display: flex; align-items: center; justify-content: center; }

/* Modal Inner */
.kamelur-ticker-modal-inner { position: relative; width: 100%; border-radius: 1rem; padding: 0; overflow: hidden; background: #ffffff; box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.18), 0 0.25rem 0.6rem rgba(0, 0, 0, 0.08); border: 0.0625rem solid rgba(0, 0, 0, 0.06); }

/* Theme Overrides (Modal Border) */
.kamelur-ticker-modal-inner.kamelur-theme-yellow { border-top: 0.25rem solid #ffbc4c; }
.kamelur-ticker-modal-inner.kamelur-theme-green { border-top: 0.25rem solid #70cb98; }

.kamelur-ticker-modal-header { padding: 0.9rem 1.4rem; display: flex; align-items: center; gap: 0.6rem; border-bottom: 0.0625rem solid rgba(0, 0, 0, 0.05); }
.kamelur-ticker-modal-emoji { font-size: 1.7rem; flex-shrink: 0; }
/* Auch hier Fallback für Title */
.kamelur-ticker-modal-title { 
    font-size: 1.2rem; /* Fallback 2018 */
    font-size: clamp(1.05rem, 0.95rem + 0.8vw, 1.5rem); 
    font-weight: 700; color: #111; 
}

/* Close Button */
.kamelur-ticker-modal-close { 
    position: absolute; top: 0.6rem; right: 0.75rem; width: 2.4rem; height: 2.4rem; 
    display: inline-flex; align-items: center; justify-content: center; 
    border-radius: 50%; background: rgba(0, 0, 0, 0.06); color: #333; 
    text-decoration: none !important; font-size: 1.45rem; font-weight: 600; line-height: 1; 
    cursor: pointer; transition: all 0.2s ease; padding-top: 0.3rem; 
}
.kamelur-ticker-modal-close:hover {
    background: rgba(0, 0, 0, 0.12);
    text-decoration: none !important;
    transform: translateY(-0.1rem) scale(1.05);
    box-shadow: 0 0.2rem 0.5rem rgba(0,0,0,0.1);
}

.kamelur-ticker-modal-body { max-width: 42rem; margin-left: auto; margin-right: auto; font-size: 1rem; line-height: 1.6; color: #222; padding: 1rem 1.4rem 1.1rem; }
@media (min-width: 48em) { .kamelur-ticker-modal-body { font-size: 1.15rem; } }
.kamelur-ticker-modal-text { margin: 0; }
.kamelur-ticker-modal-footer { border-top: 0.0625rem solid rgba(0, 0, 0, 0.05); padding: 0.85rem 1.4rem 1rem; display: flex; justify-content: flex-end; }
.kamelur-ticker-modal-footer > * + * { margin-left: 0.5rem; }

/* CTA BUTTON */
.kamelur-ticker-modal-cta { 
    display: inline-flex; align-items: center; justify-content: center; 
    text-decoration: none !important; cursor: pointer; border-radius: 999px; 
    padding: 0.45rem 1.2rem; font-weight: 600; font-size: 0.95rem; color: #111; 
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease; 
}

/* Theme Overrides (CTA Button) */
.kamelur-ticker-modal-inner.kamelur-theme-yellow .kamelur-ticker-modal-cta { background: #ffbc4c; }
.kamelur-ticker-modal-inner.kamelur-theme-green .kamelur-ticker-modal-cta { background: #70cb98; }
.kamelur-ticker-modal-inner:not(.kamelur-theme-green):not(.kamelur-theme-yellow) .kamelur-ticker-modal-cta { background: #ffbc4c; }

.kamelur-ticker-modal-cta:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.15), 0 0 0.75rem rgba(255, 255, 255, 0.4);
    filter: brightness(1.1);
    color: #000 !important;
}

.kamelur-ticker-modal-lock { overflow: hidden; }

@media (max-width: 47.9375em) {
    .kamelur-ticker { min-height: 3.25rem; padding: 0.5rem 0.7rem; }
    .kamelur-ticker-emoji-left { font-size: 1.4rem; }
    .kamelur-ticker-message { font-size: 0.95rem; padding: 0.1875rem 0.375rem; }
    .kamelur-ticker-modal-body { font-size: 1.1rem; padding: 0.95rem 1.1rem 1.2rem; }
    .kamelur-ticker-arrow { width: 2.2rem; height: 2.2rem; font-size: 1.3rem; }
    .kamelur-ticker-modal-close { width: 2.6rem; height: 2.6rem; font-size: 1.55rem; }
}