/* Re:FORM — enhance.css
   Animace, loading stavy a popup pro podpis petice.
   Samostatný soubor, aby se nesahalo do generovaného styles.css. */

/* ── SCROLL REVEAL ── */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .7s cubic-bezier(.22,.68,0,1), transform .7s cubic-bezier(.22,.68,0,1);
  }
  [data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
  }
  [data-reveal-delay="1"] { transition-delay: .08s; }
  [data-reveal-delay="2"] { transition-delay: .16s; }
  [data-reveal-delay="3"] { transition-delay: .24s; }
}

/* ── SIGNATURE COUNTER ── */
[data-sig-bar] {
  transition: width 1.3s cubic-bezier(.22,.68,0,1);
}

[data-sig-count] {
  position: relative;
  display: inline-block;
  min-width: 2ch;
}
[data-sig-count].is-loading {
  color: transparent !important;
}
[data-sig-count].is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: .3em;
  background: linear-gradient(90deg, rgba(255,255,255,.06) 25%, rgba(255,255,255,.16) 37%, rgba(255,255,255,.06) 63%);
  background-size: 400% 100%;
  animation: rf-shimmer 1.3s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  [data-sig-count].is-loading::after { animation: none; background: rgba(255,255,255,.08); }
}
@keyframes rf-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* ── BUTTON RIPPLE ── */
.btn-primary, .btn-secondary {
  position: relative;
  overflow: hidden;
}
.rf-ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(9,9,11,.25);
  pointer-events: none;
  animation: rf-ripple-anim .6s ease-out forwards;
}
.btn-secondary .rf-ripple { background: rgba(204,255,0,.25); }
@keyframes rf-ripple-anim {
  to { transform: scale(1); opacity: 0; }
}

/* ── SIDEBAR: sticky jen na desktopu, na mobilu normální tok ── */
.rf-sidebar-sticky { position: static; }
@media (min-width: 1024px) {
  .rf-sidebar-sticky { position: sticky; top: 7rem; }
}

/* ── MOBILNÍ POŘADÍ: tlačítko pro podpis první ── */
.rf-cta-col { order: -1; }
@media (min-width: 1024px) {
  .rf-cta-col { order: 0; }
}

/* ── AVATAR KROUŽKY (signatáři) ── */
.rf-avatar {
  width: 4rem;
  height: 4rem;
  margin-inline: auto;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--color-accent, #ccff00);
  color: var(--color-brand, #09090b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-display, "Space Grotesk", sans-serif);
}

/* ── URGENTNÍ LIŠTA ── */
.rf-urgent-bar {
  background: #3b0000;
  border-bottom: 1px solid #7a1a1a;
  color: #fff;
}
.rf-urgent-bar-inner {
  max-width: var(--container-6xl, 72rem);
  margin-inline: auto;
  padding: .7rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  flex-wrap: wrap;
  text-align: center;
  font-size: .8rem;
  font-weight: 700;
}
.rf-urgent-dot {
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: #ff4d4d;
  flex-shrink: 0;
  display: inline-block;
}
@media (prefers-reduced-motion: no-preference) {
  .rf-urgent-dot { animation: rf-urgent-pulse 1.6s ease-in-out infinite; }
}
@keyframes rf-urgent-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
.rf-urgent-bar a {
  color: #ccff00;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.rf-urgent-bar a:hover { color: #fff; }

/* ── PODPIS PETICE: MODAL ── */
.rf-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9,9,11,.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility 0s linear .25s;
}
.rf-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity .25s ease;
}
.rf-modal {
  position: relative;
  background: #18181b;
  border: 2px solid #cf0;
  border-radius: .75rem;
  max-width: 28rem;
  width: 100%;
  padding: 2rem;
  transform: translateY(18px) scale(.97);
  transition: transform .3s cubic-bezier(.22,.68,0,1);
  box-shadow: 8px 8px 0px rgba(204,255,0,.25);
}
.rf-modal-overlay.is-open .rf-modal {
  transform: translateY(0) scale(1);
}
.rf-modal-close {
  position: absolute;
  top: .9rem;
  right: .9rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #71717a;
  cursor: pointer;
  border-radius: .25rem;
  transition: color .15s ease, background-color .15s ease;
}
.rf-modal-close:hover { color: #ccff00; background: rgba(255,255,255,.06); }
.rf-modal-close:focus-visible { outline: 2px solid #ccff00; outline-offset: 2px; }

.rf-modal-eyebrow {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #09090b;
  background: #ccff00;
  padding: .3rem .7rem;
  border-radius: 100px;
  margin-bottom: 1.1rem;
}
.rf-modal-title {
  font-family: var(--font-display, "Space Grotesk", sans-serif);
  font-weight: 800;
  font-size: 1.4rem;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: .75rem;
  line-height: 1.2;
}
.rf-modal-facts {
  display: grid;
  gap: .6rem;
  margin: 1.25rem 0 1.5rem;
}
.rf-modal-fact {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .85rem;
  color: #d4d4d8;
  font-weight: 500;
  line-height: 1.5;
}
.rf-modal-fact svg {
  flex-shrink: 0;
  color: #ccff00;
  margin-top: .15rem;
}
.rf-modal-actions {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.rf-modal-paper-link {
  display: block;
  text-align: center;
  font-size: .78rem;
  font-weight: 700;
  color: #a3a3a3;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: .3rem;
  transition: color .15s ease;
}
.rf-modal-paper-link:hover { color: #ccff00; }

.rf-modal-cancel {
  background: none;
  border: none;
  color: #71717a;
  font-size: .8rem;
  font-weight: 600;
  text-align: center;
  padding: .5rem;
  cursor: pointer;
  transition: color .15s ease;
}
.rf-modal-cancel:hover { color: #d4d4d8; }

@media (prefers-reduced-motion: reduce) {
  .rf-modal, .rf-modal-overlay { transition: none; }
}
