/* ===== Laris Merdeka – Independence Day decorations =====
   Self-contained, .mdk- prefix, uses only merah-putih.
   Date gate is enforced in JS – this CSS is inert outside August. */

:root {
  --mdk-merah: #B5202A;
  --mdk-putih: #FFFFFF;
}

/* ---- 1. Bunting (pennant strip) -------------------------------- */
.mdk-bunting {
  position: sticky;
  top: var(--mdk-top, 0);
  z-index: 89;
  width: 100%;
  height: 10px;
  pointer-events: none;
  background-repeat: repeat-x;
  background-position: top left;

  /* inline SVG pennants: alternating merah / putih triangles */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='10' viewBox='0 0 40 10'%3E%3Cpolygon points='0,0 20,0 10,10' fill='%23B5202A' stroke='%23D1CEC5' stroke-width='0.5'/%3E%3Cpolygon points='20,0 40,0 30,10' fill='%23fff' stroke='%23D1CEC5' stroke-width='0.5'/%3E%3C/svg%3E");
}

/* slow sway on 16‑18 Aug, suppressed for users who prefer reduced motion */
@keyframes mdk-sway {
  from { transform: translateX(0); }
  to   { transform: translateX(-3px); }
}

.mdk-bunting--sway {
  animation: mdk-sway 4s ease-in-out infinite alternate;
}

@media (prefers-reduced-motion: reduce) {
  .mdk-bunting--sway {
    animation: none;
  }
}

/* ---- 2. Logo flag accent ---------------------------------------- */
.mdk-flag {
  display: inline-flex;
  margin-left: 6px;
  vertical-align: middle;
  pointer-events: none;
}

/* ---- 3. Dismissible ribbon -------------------------------------- */
/* Deliberately quiet. A full-bleed saturated red bar here reads as an alert
   banner and shoves the hero down the page; this is a seasonal flourish, not a
   system message. Tinted background, red text, one line, ~28px tall. */
.mdk-ribbon {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 5px 12px;
  box-sizing: border-box;
  background-color: #F9EAE4;
  border-bottom: 1px solid rgba(181, 32, 42, .16);
  color: var(--mdk-merah);
  font-size: 12.5px;
  line-height: 1.3;
  pointer-events: auto;   /* interactive - close button works */
}

.mdk-ribbon-body {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: center;
  min-width: 0;
}

.mdk-ribbon-main {
  font-weight: 700;
}

.mdk-ribbon-sub {
  opacity: .75;
  font-size: 12px;
}

/* The close button sits at the far right without the body having to reserve
   space for it, so the text stays optically centred in the strip. */
.mdk-ribbon-close {
  position: absolute;
  right: 8px;
}

.mdk-ribbon { position: relative; }

@media (max-width: 560px) {
  .mdk-ribbon-sub { display: none; }
  .mdk-ribbon { font-size: 12px; }
}

.mdk-ribbon-close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mdk-ribbon-close:hover,
.mdk-ribbon-close:focus {
  opacity: 0.8;
}

