/* =========================================================
   components/button.css – przyciski
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.8rem 1.75rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  /* Warstwa pod efekty ::before (połysk, wypełnienie) */
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--transition), box-shadow var(--transition), scale 0.15s ease,
    background-color var(--transition), border-color var(--transition), color var(--transition);
}

/* Lekkie „wciśnięcie” przy kliknięciu */
.btn:active {
  scale: 0.97;
}

/* Strzałka w przycisku – odjeżdża w prawo przy najechaniu */
.btn__strzalka {
  display: inline-block;
  transition: translate 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.btn:hover .btn__strzalka,
.btn:focus-visible .btn__strzalka {
  translate: 0.3rem 0;
}

/* Główny przycisk – akcent */
.btn--accent {
  background: var(--color-accent);
  color: var(--color-text-dark);
}

/* Połysk przesuwający się po przycisku przy najechaniu */
.btn--accent::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.55) 50%, transparent 75%);
  transform: translateX(-120%);
  transition: transform 0.75s ease;
}

.btn--accent:hover::before,
.btn--accent:focus-visible::before {
  transform: translateX(120%);
}

.btn--accent:hover {
  background: var(--color-accent-hover);
  color: var(--color-text-dark);
  transform: translateY(-2px);
  box-shadow: 0 0.75rem 1.75rem -0.6rem rgba(230, 184, 74, 0.6);
}

.btn--accent:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Pulsująca poświata – przyciąga uwagę do głównego CTA (zatrzymuje się przy hover) */
.btn--pulse {
  animation: btn-puls 2.8s ease-in-out infinite;
}

.btn--pulse:hover,
.btn--pulse:focus-visible {
  animation: none;
}

@keyframes btn-puls {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(230, 184, 74, 0.5);
  }
  60% {
    box-shadow: 0 0 0 0.9rem rgba(230, 184, 74, 0);
  }
}

/* Przycisk konturowy – wypełnia się od lewej przy najechaniu */
.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn--ghost::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(230, 184, 74, 0.14);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.btn--ghost:hover::before,
.btn--ghost:focus-visible::before {
  transform: scaleX(1);
}

.btn--ghost:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* Przycisk ostrzegawczy */
.btn--danger {
  background: transparent;
  color: var(--color-error);
  border-color: rgba(255, 138, 128, 0.45);
}

.btn--danger:hover {
  background: rgba(255, 138, 128, 0.12);
  color: var(--color-error);
}

/* Rozmiary */
.btn--lg {
  min-height: 3.5rem;
  padding: 1.05rem 2.75rem;
  font-size: 1.05rem;
}

.btn--sm {
  min-height: 2.25rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
}

.btn--block {
  width: 100%;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
