/* The full strip is one link, with a visible button at the end of its label. */
.site-ribbon {
  position: fixed;
  inset: auto 0 0;
  z-index: 1100;
  background: #2d4939;
  color: #fff;
  border-top: 1px solid #b9c9b5;
  box-shadow: 0 -8px 24px rgba(28, 52, 38, .18);
  font-family: Tajawal, sans-serif;
}

.site-ribbon__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 11px 20px calc(11px + env(safe-area-inset-bottom, 0px));
  color: #fff;
  text-align: center;
  text-decoration: none;
}

.site-ribbon__message {
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.4;
}

.site-ribbon__button {
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  min-height: 44px;
  border-radius: 10px;
  background: #f5f3e8;
  color: #2d4939;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  transition: background-color .2s ease, transform .2s ease;
}

.site-ribbon__button::after {
  content: '';
  position: absolute;
  inset: -30% auto -30% -45%;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .85), transparent);
  transform: translateX(-100%) skewX(-24deg);
  animation: site-ribbon-shine 3.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes site-ribbon-shine {
  0%, 35% { transform: translateX(-100%) skewX(-24deg); }
  70%, 100% { transform: translateX(750%) skewX(-24deg); }
}

.site-ribbon__link:hover .site-ribbon__button { background: #fff; transform: translateY(-2px); }
.site-ribbon__link:focus-visible { outline: 3px solid #e9d9a6; outline-offset: -3px; }
body:has(> .site-ribbon) { padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }

@media (max-width: 640px) {
  .site-ribbon__link {
    flex-direction: column;
    gap: 5px;
    padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .site-ribbon__message { font-size: 14px; }
  .site-ribbon__button { width: min(100%, 330px); font-size: 14px; }
  body:has(> .site-ribbon) { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
  .site-ribbon__button { transition: none; }
  .site-ribbon__button::after { animation: none; }
}
