/* ---------------------------------------------------------------
   Zimbabwe flag brand layer
   ---------------------------------------------------------------
   The application surfaces were repainted onto the flag palette in
   place (see database/scripts/zimbabwe_*.php). This file carries the
   pieces that are shared markup rather than one-off colours:

     * the seven-stripe ribbon that sits under every top bar
     * the flag colour tokens for new work
     * a small "proudly Zimbabwean" chip for footers

   Load it after a page's own styles so it only adds.
------------------------------------------------------------------ */

:root {
    --zw-green: #009639;
    --zw-green-dark: #006B2A;
    --zw-gold: #FFD200;
    --zw-gold-dark: #7A5C00;
    --zw-red: #D21034;
    --zw-red-dark: #A00C26;
    --zw-black: #101010;
    --zw-white: #FFFFFF;
    --zw-ink-on-gold: #2A2200;
    --zw-flag-stripes: linear-gradient(90deg,
        #009639 0 14.2857%,
        #FFD200 14.2857% 28.5714%,
        #D21034 28.5714% 42.8571%,
        #101010 42.8571% 57.1429%,
        #D21034 57.1429% 71.4286%,
        #FFD200 71.4286% 85.7143%,
        #009639 85.7143% 100%);
}

/* The national colours as seven horizontal stripes. */
.zw-ribbon {
    height: 3px;
    background: var(--zw-flag-stripes);
    position: relative;
    z-index: 9999;
}

.zw-ribbon.thin {
    height: 2px;
}

/* Left-hand flag edge, for cards and panels that want a flag accent. */
.zw-edge {
    border-left: 4px solid transparent !important;
    border-image: linear-gradient(180deg, #009639 0 20%, #FFD200 20% 40%, #D21034 40% 60%, #101010 60% 80%, #009639 80% 100%) 1;
}

/* Footer / header chip. */
.zw-flag-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
}

.zw-flag-chip i {
    display: inline-block;
    width: 28px;
    height: 13px;
    border-radius: 3px;
    background: var(--zw-flag-stripes);
    box-shadow: inset 0 0 0 1px #0000001f;
}

/* Gold is the one flag colour that cannot carry white text. */
.zw-on-gold,
[data-zw-surface="gold"] {
    color: var(--zw-ink-on-gold) !important;
}

@media print {
    .zw-ribbon {
        display: none;
    }
}

/* ---------------------------------------------------------------
   The flying Zimbabwe bird (shared with the federation app)
   ---------------------------------------------------------------
   Decorative only: no pointer events, hidden from assistive
   technology, and still when the visitor asks for reduced motion.
--------------------------------------------------------------- */

.zw-bird-scene {
    position: relative;
    z-index: 1;
    width: var(--zw-bird-w, 200px);
    margin: 0 auto;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

.zw-bird-scene.zw-bird-float {
    position: absolute;
    top: 6px;
    right: 8px;
    margin: 0;
    --zw-bird-w: clamp(96px, 22vw, 150px);
    opacity: .95;
}

.zw-bird-svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    filter: drop-shadow(0 10px 18px rgba(4, 24, 10, .28));
}

.zw-bird-drift {
    animation: zwBirdGlide 17s cubic-bezier(.45, 0, .55, 1) infinite;
}

.zw-bird-bob {
    animation: zwBirdBob 4.6s ease-in-out infinite;
}

.zw-bird-wing {
    transform-box: fill-box;
    transform-origin: 90% 96%;
}

.zw-bird-wing-near { animation: zwWingNear 900ms ease-in-out infinite alternate; }
.zw-bird-wing-back { animation: zwWingFar 900ms ease-in-out infinite alternate; animation-delay: 60ms; }

.zw-bird-flag {
    transform-box: fill-box;
    transform-origin: 100% 50%;
    animation: zwFlagWave 2.6s ease-in-out infinite;
}

.zw-bird-air path {
    stroke-dasharray: 7 13;
    animation: zwAirFlow 2.4s linear infinite, zwAirFade 2.4s ease-in-out infinite;
}

.zw-air-2 { animation-delay: .45s; }
.zw-air-3 { animation-delay: .9s; }

@keyframes zwBirdGlide {
    0%   { transform: translate3d(-14px, 4px, 0) rotate(-1.2deg); }
    50%  { transform: translate3d(14px, -8px, 0) rotate(1.2deg); }
    100% { transform: translate3d(-14px, 4px, 0) rotate(-1.2deg); }
}

@keyframes zwBirdBob {
    0%, 100% { transform: translateY(0) }
    50%      { transform: translateY(-7px) }
}

@keyframes zwWingNear { from { transform: rotate(-14deg) } to { transform: rotate(9deg) } }
@keyframes zwWingFar  { from { transform: rotate(-9deg) }  to { transform: rotate(5deg) } }

@keyframes zwFlagWave {
    0%, 100% { transform: skewY(-2.6deg) scaleY(.97) skewX(1.4deg) }
    50%      { transform: skewY(2.6deg) scaleY(1.03) skewX(-1.4deg) }
}

@keyframes zwAirFlow {
    from { stroke-dashoffset: 40 }
    to   { stroke-dashoffset: 0 }
}

@keyframes zwAirFade {
    0%, 100% { opacity: .18 }
    45%      { opacity: .85 }
}

@media (prefers-reduced-motion: reduce) {
    .zw-bird-drift,
    .zw-bird-bob,
    .zw-bird-wing-near,
    .zw-bird-wing-back,
    .zw-bird-flag,
    .zw-bird-air path {
        animation: none !important;
    }
    .zw-bird-air path { stroke-dasharray: none; opacity: .5; }
}

@media print {
    .zw-bird-scene { display: none; }
}

/* Compact mascot placement used on the sign-in screen. */
.zw-bird-scene.zw-bird-mini {
    --zw-bird-w: 150px;
    margin: 4px auto -2px;
}
