/* ============================================
   SIMPLEPAY — COMPONENTS
   Botones, cards, inputs, badges, nav
   ============================================ */

/* ---------- BOTONES ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-coral {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: var(--shadow-coral);
}

.btn-coral:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(255,107,107,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

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

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}

/* Ripple effect */
.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

.btn:active::after {
  width: 200px;
  height: 200px;
}

/* ---------- CARDS ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.card-feature {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  position: relative;
  transition: var(--transition);
}

.card-feature:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

/* ---------- INPUTS ---------- */
.input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  transition: var(--transition);
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}

.input::placeholder {
  color: var(--text-muted);
}

/* ---------- BADGES ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background: rgba(16,185,129,0.12);
  color: var(--success);
}

.badge-coral {
  background: rgba(255,107,107,0.12);
  color: var(--primary);
}

.badge-cobalt {
  background: rgba(220,38,38,0.12);
  color: var(--primary);
}

/* ---------- NAVBAR ---------- */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 48px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  color: var(--primary);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text);
}

/* El selector de idioma es hermano directo del navbar (no vive dentro de
   .nav-links). Este margin-left:auto absorbe el espacio libre y empuja el
   selector y todo lo que va detras hacia la derecha, asi que en escritorio
   se ve "logo ....... [idioma] enlaces [Try Demo]" y en movil, con
   .nav-links colapsado, queda "logo ....... [idioma] ☰". */
.lang-selector {
  margin-left: auto;
}

@media (max-width: 900px) {
  .mobile-menu-btn {
    display: block;
  }

  .navbar {
    gap: 12px;
  }
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 15px;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.2s;
}

.nav-link:hover::after {
  width: 100%;
}

/* ---------- CODE BLOCK ---------- */
.code-block {
  background: var(--border-light);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-family: 'SF Mono', monospace;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.code-block code {
  overflow: hidden;
  text-overflow: ellipsis;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.copy-btn:hover {
  background: rgba(220,38,38,0.1);
}

/* ---------- STEP NUMBER ---------- */
.step-number {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: white;
}

.step-number.cobalt {
  background: var(--primary);
}

.step-number.coral {
  background: var(--primary);
}

/* ---------- TOAST NOTIFICATIONS ---------- */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  animation: slideIn 0.3s ease-out;
  font-size: 14px;
  font-weight: 500;
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--primary);
}

.toast.warning {
  border-left-color: var(--warning);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.toast.hiding {
  animation: slideOut 0.3s ease-in forwards;
}

/* ---------- LOADING SPINNER ---------- */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-loading .spinner {
  border-top-color: white;
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--text);
  color: var(--text-muted);
  padding: 48px;
  text-align: center;
  font-size: 14px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 24px;
}

.footer-link {
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-link:hover {
  color: white;
}

/* ---------- TRUST BAR ---------- */
.trust-bar {
  background: linear-gradient(135deg, var(--primary), #991B1B);
  padding: 40px 48px;
  text-align: center;
}

.trust-label {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.trust-items {
  display: flex;
  justify-content: center;
  gap: 48px;
  align-items: center;
  flex-wrap: wrap;
}

.trust-item {
  color: white;
  font-weight: 700;
  font-size: 18px;
  opacity: 0.9;
}

.lang-switch, .lang-switch-top { position: relative; }
.lang-switch button, .lang-switch-top button {
  background: none; border: none; cursor: pointer; font-size: 13px;
  color: var(--text-secondary); display: inline-flex; align-items: center; gap: 4px;
}