
.rb-sd { position: relative; z-index: 40; }

.rb-sd { transition: transform .28s cubic-bezier(.16,1,.3,1), opacity .28s ease; }
.rb-sd--enter { animation: rb-sd-enter .32s cubic-bezier(.16,1,.3,1) both; }
.rb-sd-float.rb-sd--enter { animation-name: rb-sd-enter-float; }
.rb-sd--leave { transform: translateY(-12px); opacity: 0; }
.rb-sd-float.rb-sd--leave { transform: translateY(16px); opacity: 0; }
@keyframes rb-sd-enter { from { transform: translateY(-8px); } to { transform: none; } }
@keyframes rb-sd-enter-float { from { transform: translateY(10px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .rb-sd { transition: none; }
    .rb-sd--enter { animation: none; }
    .rb-sd--leave { transform: none; opacity: 1; }
}

.rb-sd-message { display: flex; align-items: center; gap: 14px; flex: 1 1 auto; min-width: 0; }
.rb-sd-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rb-sd-icon { font-size: 1.15rem; opacity: .95; flex: 0 0 auto; }
.rb-sd-title, .rb-sd-desc { overflow-wrap: anywhere; }
.rb-sd-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px 14px; flex: 0 1 auto; }
.rb-sd-actions:empty { display: none; }

.rb-sd-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 24px; gap: 20px;
    background: linear-gradient(135deg, var(--rb-sd-from), var(--rb-sd-to));
    color: var(--rb-sd-text);
    font-weight: 600;
    box-shadow: 0 1px 0 rgba(0,0,0,.1);
    position: relative; overflow: hidden;
}
.rb-sd-bar .rb-sd-message { display: block; line-height: 1.45; padding-inline-start: 2.25rem; text-indent: -2.25rem; }
.rb-sd-bar .rb-sd-icon { display: inline-block; width: 1.5rem; margin-inline-end: .75rem; text-align: center; text-indent: 0; }
.rb-sd-bar .rb-sd-title { font-size: 1rem; }
.rb-sd-bar .rb-sd-divider { opacity: .7; margin: 0 .5em; }
.rb-sd-bar .rb-sd-desc { font-weight: 400; opacity: .9; text-indent: 0; }

.rb-sd-hero {
    padding: 36px 28px;
    background: linear-gradient(135deg, var(--rb-sd-from), var(--rb-sd-to));
    color: var(--rb-sd-text);
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    position: relative; overflow: hidden;
}
.rb-sd-hero .rb-sd-icon { font-size: 2rem; }
.rb-sd-hero .rb-sd-title { font-size: 1.8rem; font-weight: 800; line-height: 1.15; }
.rb-sd-hero .rb-sd-desc { font-size: 1rem; opacity: .92; max-width: 60ch; }

.rb-sd-card {
    margin: 16px auto;
    max-width: 1200px;
    border-radius: 14px;
    padding: 22px 26px;
    background: linear-gradient(135deg, var(--rb-sd-from), var(--rb-sd-to));
    color: var(--rb-sd-text);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,.35);
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    position: relative; overflow: hidden;
}
.rb-sd-card .rb-sd-icon { font-size: 1.6rem; }
.rb-sd-card .rb-sd-title { font-size: 1.25rem; font-weight: 700; }
.rb-sd-card .rb-sd-desc { opacity: .92; font-size: .95rem; }

.rb-sd-float {
    position: fixed; inset-inline-end: 20px; bottom: 20px;
    width: 360px; max-width: calc(100vw - 40px); padding: 18px 20px; border-radius: 14px;
    background: linear-gradient(135deg, var(--rb-sd-from), var(--rb-sd-to));
    color: var(--rb-sd-text);
    box-shadow: 0 18px 50px -20px rgba(0,0,0,.55);
    display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 14px;
    z-index: 9999;
}
.rb-sd-float .rb-sd-message { flex: 1 1 0; align-items: flex-start; }
.rb-sd-float > .rb-sd-close { order: 1; }
.rb-sd-float > .rb-sd-actions { order: 2; flex: 1 1 100%; justify-content: flex-start; }
.rb-sd-float .rb-sd-title { font-weight: 700; }
.rb-sd-float .rb-sd-desc { opacity: .9; font-size: .9rem; }

.rb-sd-image { padding: 8px 24px; }
.rb-sd-image__frame {
    position: relative; margin-inline: auto;
    width: -webkit-fit-content; width: -moz-fit-content; width: fit-content; max-width: 100%;
    border-radius: 12px; overflow: hidden;
}
.rb-sd-image__link, .rb-sd-image picture { display: block; }
.rb-sd-image__img { display: block; width: auto; max-width: 100%; height: auto; }
.rb-sd-image__empty {
    display: flex; align-items: center; justify-content: center;
    width: min(640px, 100vw - 48px); height: 120px; font-size: 2rem; opacity: .5;
    background: rgba(127,127,127,.15);
}
.rb-sd.rb-sd-image .rb-sd-image__frame > .rb-sd-close {
    position: absolute; top: 4px; inset-inline-end: 4px; margin: 0;
    background-color: rgba(0,0,0,.55); color: #fff;
}
.rb-sd.rb-sd-image .rb-sd-image__frame > .rb-sd-close:hover { background-color: rgba(0,0,0,.75); }

.rb-sd-decoration {
    position: absolute; inset-inline-start: -10px; top: 50%; transform: translateY(-50%);
    height: 130%; opacity: .85; pointer-events: none;
}

.rb-sd-countdown { display: flex; gap: 8px; }
.rb-sd-countdown__cell {
    background: rgba(0,0,0,.25);
    border-radius: 6px;
    padding: 6px 10px;
    min-width: 54px;
    text-align: center;
    line-height: 1.1;
}
.rb-sd-countdown__num { font-size: 1.1rem; font-weight: 700; color: var(--rb-sd-accent); font-variant-numeric: tabular-nums; }
.rb-sd-countdown__label { font-size: .55rem; text-transform: uppercase; opacity: .85; letter-spacing: .03em; }

.rb-sd-close {
    box-sizing: border-box;
    width: 44px; height: 44px; padding: 7px; margin: -7px;
    background: rgba(0,0,0,.25); background-clip: content-box;
    color: inherit; border: 0; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background-color .15s; flex: 0 0 auto;
}
.rb-sd-close:hover { background-color: rgba(0,0,0,.45); }
.rb-sd-close:focus-visible { outline: 2px solid var(--rb-sd-accent); outline-offset: -5px; }

a.rb-sd-link { color: inherit; text-decoration: none; display: block; }

.rb-sd-cta {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: 8px 16px; border-radius: 9999px;
    font-weight: 700; font-size: .9rem; text-decoration: none;
    white-space: nowrap; cursor: pointer; flex: 0 0 auto;
    transition: transform .12s ease, filter .12s ease, background .12s ease;
}
.rb-sd-cta:hover { transform: translateY(-1px); filter: brightness(1.05); }
.rb-sd-cta--solid   { background: var(--rb-sd-accent); color: #111827; }
.rb-sd-cta--outline { background: transparent; color: var(--rb-sd-text); border: 2px solid currentColor; }
.rb-sd-cta--text    { background: transparent; color: var(--rb-sd-accent); text-decoration: underline; padding: 8px 6px; }

.rb-sd-desc a { color: inherit; text-decoration: underline; }

.rb-sd--center { justify-content: center; }
.rb-sd--center > .rb-sd-message { flex: 0 1 auto; justify-content: center; }
.rb-sd--center .rb-sd-text { align-items: center; text-align: center; }
.rb-sd--center.rb-sd-bar .rb-sd-message { text-align: center; padding-inline-start: 0; text-indent: 0; }
.rb-sd--center > .rb-sd-actions { justify-content: center; }
.rb-sd--center.rb-sd--dismissible::before { content: ""; order: -1; flex: 0 0 44px; height: 1px; margin-inline: -7px auto; }
.rb-sd--center.rb-sd--dismissible > .rb-sd-close { margin-inline-start: auto; }

.rb-sd-fx { position: fixed; inset: 0; pointer-events: none; z-index: 9998; }

.rb-sd-lights {
    position: fixed; top: 0; left: 0; right: 0; height: 14px;
    display: flex; justify-content: space-around; align-items: flex-start;
    pointer-events: none; z-index: 9997;
}
.rb-sd-bulb {
    width: 8px; height: 8px; border-radius: 50%;
    background: #fbbf24; box-shadow: 0 0 8px 2px rgba(251,191,36,.7);
    animation: rb-sd-blink 1.6s ease-in-out infinite;
}
.rb-sd-bulb:nth-child(3n)   { background: #f472b6; box-shadow: 0 0 8px 2px rgba(244,114,182,.7); }
.rb-sd-bulb:nth-child(3n+1) { background: #22d3ee; box-shadow: 0 0 8px 2px rgba(34,211,238,.7); }
.rb-sd-lights--static .rb-sd-bulb { animation: none; }
@keyframes rb-sd-blink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

@media (max-width: 900px) {
    .rb-sd-bar, .rb-sd-hero, .rb-sd-card { flex-wrap: wrap; align-items: flex-start; }
    .rb-sd-bar > .rb-sd-message, .rb-sd-hero > .rb-sd-message, .rb-sd-card > .rb-sd-message { flex: 1 1 0; }
    .rb-sd-bar > .rb-sd-close, .rb-sd-hero > .rb-sd-close, .rb-sd-card > .rb-sd-close { order: 1; }
    .rb-sd-bar > .rb-sd-actions, .rb-sd-hero > .rb-sd-actions, .rb-sd-card > .rb-sd-actions { order: 2; flex: 1 1 100%; justify-content: flex-start; }
    .rb-sd--center > .rb-sd-actions { justify-content: center; }
    .rb-sd-hero, .rb-sd-card { row-gap: 16px; }
}

@media (max-width: 640px) {
    .rb-sd-bar, .rb-sd-hero, .rb-sd-card { gap: 10px; }
    .rb-sd-bar { padding: 12px 14px; }
    .rb-sd-hero { padding: 22px 18px; }
    .rb-sd-card { padding: 18px; }
    .rb-sd-hero > .rb-sd-message, .rb-sd-card > .rb-sd-message { align-items: flex-start; }
    .rb-sd-bar .rb-sd-divider { display: none; }
    .rb-sd-bar .rb-sd-desc { display: block; margin-top: 2px; }
    .rb-sd.rb-sd-bar .rb-sd-message .rb-sd-desc { padding-inline-start: 0; }
    .rb-sd-hero .rb-sd-title { font-size: 1.4rem; }
    .rb-sd-hero .rb-sd-icon { font-size: 1.6rem; }
    .rb-sd-countdown__cell { min-width: 44px; padding: 4px 7px; }
    .rb-sd-float { inset-inline: 12px; bottom: 12px; width: auto; max-width: none; }
    .rb-sd-image { padding: 6px 12px; }
    .rb-sd-image__frame { border-radius: 10px; }
}
