/* ==========================================================================
   Anan Early Years – features switched on from the admin panel
   (announcement bar, pop-up, admin toolbar, floating button tweaks)
   ========================================================================== */

/* ---------- Announcement bar ---------- */
.announce {
    position: relative;
    z-index: 1000;
    padding: 9px 44px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    background: var(--purple-deep);
}

.announce--rainbow { background: linear-gradient(90deg, #7d5a9a, #e2709d 35%, #ea8c48 65%, #5fa396); }
.announce--purple { background: var(--purple-deep); }
.announce--pink { background: #e0679a; }
.announce--yellow { background: var(--yellow); color: var(--purple-ink); }
.announce--teal { background: #5a9f94; }

.announce-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 12px;
}

.announce-icon {
    animation: announceWiggle 2.6s ease-in-out infinite;
}

.announce-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 12px;
    border-radius: 30px;
    color: inherit;
    font-weight: 700;
    background: rgba(255, 255, 255, .2);
    transition: background .3s, gap .3s;
}

.announce-link:hover {
    gap: 10px;
    color: inherit;
    background: rgba(255, 255, 255, .32);
}

.announce--yellow .announce-link { background: rgba(255, 255, 255, .55); }

.announce-close {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    color: inherit;
    background: transparent;
    transform: translateY(-50%);
    transition: background .3s;
}

.announce-close:hover { background: rgba(255, 255, 255, .2); }

.announce.is-closing {
    overflow: hidden;
    animation: announceOut .4s ease forwards;
}

@keyframes announceWiggle {
    0%, 80%, 100% { transform: rotate(0); }
    85% { transform: rotate(-14deg); }
    90% { transform: rotate(12deg); }
    95% { transform: rotate(-6deg); }
}

@keyframes announceOut {
    to { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; }
}

@media (max-width: 575px) {
    .announce { padding: 8px 40px 8px 14px; font-size: 13px; text-align: left; }
    .announce-inner { justify-content: flex-start; }
}

/* ---------- Pop-up ---------- */
.site-popup {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 20px;
}

.site-popup[hidden] { display: none; }

.site-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(32, 14, 54, .55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    animation: popupFade .4s ease both;
}

.site-popup-card {
    position: relative;
    display: grid;
    width: min(460px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .5);
    animation: popupIn .55s cubic-bezier(.2, .9, .3, 1.2) both;
}

.site-popup-card.has-img {
    grid-template-columns: 1fr 1.1fr;
    width: min(820px, 100%);
}

.site-popup-img img {
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: cover;
}

.site-popup-body {
    padding: 44px 38px 40px;
    align-self: center;
}

.site-popup-bar {
    display: block;
    width: 60px;
    height: 6px;
    margin-bottom: 18px;
    border-radius: 6px;
    background: var(--rainbow);
}

.site-popup-body h2 {
    margin-bottom: 12px;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.02em;
}

.site-popup-body p {
    margin-bottom: 24px;
    color: var(--muted, #6b6578);
}

.site-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    color: var(--purple-ink, #34175a);
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .35);
    transition: transform .3s;
}

.site-popup-close:hover { transform: rotate(90deg); }

@keyframes popupFade { from { opacity: 0; } }
@keyframes popupIn { from { opacity: 0; transform: translateY(30px) scale(.94); } }

@media (max-width: 767px) {
    .site-popup-card.has-img { grid-template-columns: 1fr; width: min(460px, 100%); }
    .site-popup-img img { min-height: 0; height: 190px; }
    .site-popup-body { padding: 30px 26px 30px; }
}

/* ---------- Floating buttons ---------- */
.to-top.to-top-low { bottom: 22px; }

/* ---------- Admin toolbar (signed-in admins only) ---------- */
.admin-bar {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 1990;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    background: #2a1248;
    box-shadow: 0 14px 34px -14px rgba(20, 8, 36, .8);
}

.admin-bar a, .admin-bar button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 30px;
    color: #fff;
    background: transparent;
    transition: background .25s;
}

.admin-bar a:hover, .admin-bar button:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.admin-bar .admin-bar-brand { width: 34px; padding: 0; justify-content: center; background: var(--rainbow); }
.admin-bar .admin-bar-warn { color: #2a1248; background: var(--yellow); }
.admin-bar .admin-bar-warn:hover { color: #2a1248; background: #f8d77e; }
.admin-bar .admin-bar-hide { width: 34px; padding: 0; justify-content: center; opacity: .6; }
.admin-bar.is-hidden { display: none; }

@media print {
    .announce, .site-popup, .admin-bar { display: none !important; }
}
