/* ============================================================
   AE Topbar Announcement Slider Widget — CSS v2
   ============================================================ */

/* ── Bar wrapper ─────────────────────────────────────────── */
.ae-topbar {
    background-color: #1a1a1a;
    color: #ffffff;
    height: 44px;
    width: 100%;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.ae-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    padding-inline: 24px;
    box-sizing: border-box;
    gap: 12px;
}

/* ── Center: arrows + slider + bullets + pause ──────────── */
.ae-topbar__center {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
    min-width: 0;
    max-width: 800px;
}

/* ── Slider text area ───────────────────────────────────── */
.ae-topbar__slider {
    position: relative;
    overflow: hidden;
    min-width: 160px;
    max-width: 500px;
    text-align: center;
    flex: 1;
}

/* Each slide — hidden by default */
.ae-topbar__slide {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-family: Montserrat, sans-serif;
    animation: ae-topbar-fadein 0.32s ease forwards;
}
.ae-topbar__slide.is-active {
    display: flex;
}

.ae-topbar__slide-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: inherit;
}
.ae-topbar__slide-link:hover .ae-topbar__slide-title {
    text-decoration: underline;
}

.ae-topbar__slide-title {
    font-size: 12px;
    font-weight: 400;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
    line-height: 1.3;
}

.ae-topbar__slide-subtitle {
    font-size: 10px;
    color: rgba(255,255,255,0.7);
    white-space: nowrap;
    display: block;
    font-weight: 400;
    line-height: 1.2;
}

@keyframes ae-topbar-fadein {
    from { opacity:0; transform:translateY(4px); }
    to   { opacity:1; transform:translateY(0);   }
}

/* ── Arrow buttons ──────────────────────────────────────── */
.ae-topbar__arrow {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    opacity: 0.85;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 3px;
}
.ae-topbar__arrow:hover  { opacity: 1; }
.ae-topbar__arrow:active { opacity: 0.6; }
.ae-topbar__arrow svg    { display: block; flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════
   PAUSE / PLAY BUTTON
   ──────────────────────────────────────────────────────────
   PLAYING (no class):   ⏸ bars VISIBLE  |  ▶ triangle HIDDEN
   PAUSED  (.is-paused): ⏸ bars HIDDEN   |  ▶ triangle VISIBLE
   ══════════════════════════════════════════════════════════ */
.ae-topbar__pause {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    opacity: 0.85;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 3px;
    position: relative;
    width: 22px;
    height: 22px;
}
.ae-topbar__pause:hover  { opacity: 1; }
.ae-topbar__pause:active { opacity: 0.6; }

/* Both icons are absolutely positioned in the same space */
.ae-topbar__pause-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.18s ease;
    pointer-events: none;
}

/* ── PLAYING STATE (default, no .is-paused) ─────────────── */
/* ⏸ PAUSE bars: VISIBLE */
.ae-topbar__pause .ae-topbar__pause-icon--pause {
    opacity: 1 !important;
    visibility: visible !important;
}
/* ▶ PLAY triangle: HIDDEN */
.ae-topbar__pause .ae-topbar__pause-icon--play {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* ── PAUSED STATE (.is-paused on button) ────────────────── */
/* ⏸ PAUSE bars: HIDDEN */
.ae-topbar__pause.is-paused .ae-topbar__pause-icon--pause {
    opacity: 0 !important;
    visibility: hidden !important;
}
/* ▶ PLAY triangle: VISIBLE */
.ae-topbar__pause.is-paused .ae-topbar__pause-icon--play {
    opacity: 1 !important;
    visibility: visible !important;
}

/* ── Dot bullets ────────────────────────────────────────── */
.ae-topbar__dots {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}
.ae-topbar__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.35);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    flex-shrink: 0;
}
.ae-topbar__dot:hover    { background-color: rgba(255,255,255,0.65); }
.ae-topbar__dot.is-active {
    background-color: #ffffff;
    transform: scale(1.3);
}

/* ── Right area (optional) ──────────────────────────────── */
.ae-topbar__right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.ae-topbar__right-text {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}
.ae-topbar__phone {
    font-size: 13px;
    font-weight: 700;
    color: #e8192c;
    text-decoration: none;
    font-family: Montserrat, sans-serif;
    white-space: nowrap;
}
.ae-topbar__phone:hover       { text-decoration: underline; }
.ae-topbar__phone-label {
    font-size: 10px;
    color: rgba(255,255,255,0.65);
    font-family: Montserrat, sans-serif;
    white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1023px) {
    .ae-topbar__inner   { padding-inline: 16px; gap: 8px; }
    .ae-topbar__slide-title { font-size: 11px; }
}
@media (max-width: 767px) {
    .ae-topbar__inner   { padding-inline: 12px; }
    .ae-topbar__right   { display: none; }
    .ae-topbar__center  { gap: 6px; }
    .ae-topbar__slide-title { font-size: 11px; max-width: 200px; }
}
@media (max-width: 479px) {
    .ae-topbar         { height: 40px; }
    .ae-topbar__inner  { padding-inline: 8px; gap: 4px; }
    .ae-topbar__slide-title { font-size: 10px; max-width: 160px; }
    .ae-topbar__arrow  { padding: 3px 4px; }
    .ae-topbar__pause  { padding: 3px 4px; }
    .ae-topbar__center { gap: 4px; }
}
