/* ================================================================
   Resayil — Announcement bar (Phase 24.12 Plan 09)
   Ported from rs-ui-showcase.css §1.
   Thin sticky strip at the top of every page carrying a single
   admin-authored announcement. Accent-soft background, accent text,
   close button on the trailing edge. Safe-DOM rendered by rs-announcement.js.
   ================================================================ */

.rs-ann-bar {
  position: sticky;
  top: 0;
  z-index: calc(var(--rs-z-sticky, 1020) + 1);
  background: var(--rs-accent-soft);
  border-bottom: 1px solid var(--rs-accent);
  padding: var(--rs-space-2) var(--rs-space-6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--rs-space-3);
  font-family: var(--rs-font-sans);
  font-size: var(--rs-text-sm);
  font-weight: 500;
  color: var(--rs-accent);
  line-height: 1.4;
}
[dir="rtl"] .rs-ann-bar { font-family: var(--rs-font-arabic); }

.rs-ann-bar.rs-hidden { display: none !important; }

.rs-ann-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rs-ann-icon-svg {
  width: 18px;
  height: 18px;
}

.rs-ann-text {
  display: inline-flex;
  align-items: center;
  gap: var(--rs-space-2);
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rs-ann-close {
  margin-inline-start: auto;
  background: none;
  border: none;
  color: var(--rs-accent);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--rs-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background-color 120ms ease, color 120ms ease;
}
.rs-ann-close:hover,
.rs-ann-close:focus-visible {
  background: var(--rs-accent);
  color: #fff;
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .rs-ann-close { transition: none; }
}

@media (max-width: 640px) {
  .rs-ann-bar {
    padding-inline: var(--rs-space-3);
    font-size: var(--rs-text-xs);
  }
  .rs-ann-text { white-space: normal; }
}
