/* TapasSEO Buy Now sticky bar
 * Activates only on pages with <body data-tapas-service="..."> attribute.
 * Mobile: full-width fixed bottom. Desktop: floating card bottom-right.
 * Generated: 2026-04-28
 */

.tsbuy {
  position: fixed;
  z-index: 90;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 220ms ease-out, transform 220ms ease-out;
}
.tsbuy.is-ready { visibility: visible; opacity: 1; pointer-events: auto; }

/* Desktop: floating card bottom-right */
@media (min-width: 720px) {
  .tsbuy {
    right: 24px;
    bottom: 24px;
    max-width: 360px;
    transform: translateY(8px);
  }
  .tsbuy.is-ready { transform: translateY(0); }
}

/* Mobile: full-width fixed at bottom */
@media (max-width: 719px) {
  .tsbuy {
    left: 0; right: 0; bottom: 0;
    transform: translateY(100%);
  }
  .tsbuy.is-ready { transform: translateY(0); }
}

.tsbuy__panel {
  background: var(--dark-card, #221838);
  border: 1px solid rgba(0, 212, 170, 0.28);
  border-radius: 16px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 24px rgba(0, 212, 170, 0.15);
  font-family: 'Outfit', sans-serif;
}
@media (max-width: 719px) {
  .tsbuy__panel {
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
  }
}

.tsbuy__info {
  min-width: 0;
}
.tsbuy__service {
  font-size: 0.78rem;
  color: var(--text-muted, #9b95b8);
  line-height: 1.3;
  margin: 0 0 2px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tsbuy__price {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--teal, #00D4AA);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.tsbuy__price-strike {
  font-family: 'Fraunces', serif;
  font-size: 0.95rem;
  color: var(--text-muted, #9b95b8);
  text-decoration: line-through;
  margin-left: 8px;
  font-weight: 600;
}

.tsbuy__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 22px;
  background: linear-gradient(135deg, var(--teal, #00D4AA) 0%, #00b894 100%);
  color: var(--dark, #0F0A1F);
  border: none;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  box-shadow: 0 2px 12px rgba(0, 212, 170, 0.3);
  text-decoration: none;
}
.tsbuy__btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 212, 170, 0.5);
}
.tsbuy__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}
.tsbuy__btn.is-loading { pointer-events: none; opacity: 0.75; }
.tsbuy__btn.is-loading::after {
  content: '';
  width: 14px; height: 14px;
  margin-left: 4px;
  border: 2px solid rgba(15, 10, 31, 0.3);
  border-top-color: var(--dark, #0F0A1F);
  border-radius: 50%;
  animation: tsbuy-spin 700ms linear infinite;
}
@keyframes tsbuy-spin { to { transform: rotate(360deg); } }

.tsbuy__error {
  display: none;
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(229, 62, 62, 0.12);
  border: 1px solid rgba(229, 62, 62, 0.3);
  border-radius: 8px;
  font-size: 0.78rem;
  color: #ff8181;
  grid-column: 1 / -1;
  line-height: 1.4;
}
.tsbuy__error.is-visible { display: block; }
.tsbuy__error a { color: #ff8181; text-decoration: underline; }

.tsbuy__close {
  position: absolute;
  top: -10px; right: -10px;
  width: 28px; height: 28px;
  background: var(--dark, #0F0A1F);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: var(--text-muted, #9b95b8);
  font-size: 0.95rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s;
}
.tsbuy__close:hover { background: rgba(229, 62, 62, 0.15); color: #ff8181; border-color: rgba(229, 62, 62, 0.3); }
@media (min-width: 720px) {
  .tsbuy__close { display: flex; }
}

.tsbuy.is-dismissed { display: none; }

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