/*
Theme Name: Firma IA
Theme URI: https://firmaia.com
Description: Un generador de firmas con IA elegante, moderno y rápido, desarrollado en español con Tailwind, Lucide y JavaScript.
Version: 1.0.0
Author: Dev
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: firma-ai
*/

:root {
  --brand: #b91c1c;      /* Spanish Crimson Red */
  --brand-dark: #7f1d1d; /* Deep Burgundy */
  --brand-gold: #d97706; /* Saffron/Gold */
  --ink: #0f172a;        /* Charcoal Slate */
  --paper: #fdfbf7;      /* Warm Sand/Cream background */
}

/* Force border radius to 4px as requested by user */
* {
  border-radius: 4px !important;
}

body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

.font-display {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
}

.checker {
  background-image:
    linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
    linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  background-color: #ffffff;
}

canvas {
  touch-action: none;
  display: block;
  width: 100%;
  height: 100%;
}

.swatch {
  width: 28px;
  height: 28px;
  cursor: pointer;
  border: 2px solid #d1d5db;
  transition: transform .12s ease, border-color .12s ease;
}
.swatch:hover {
  transform: scale(1.08);
}
.swatch.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(185, 28, 28, 0.2);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: #cbd5e1;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--brand);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #cbd5e1;
}
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--brand);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #cbd5e1;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  transition: background .15s ease;
}
.btn-primary:hover {
  background: var(--brand-dark);
}
.btn-primary:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.btn-outline {
  border: 1.5px solid #cbd5e1;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s ease, color .15s ease;
}
.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.tab-btn {
  transition: all .15s ease;
  border-bottom: 2px solid transparent;
}
.tab-btn.active {
  border-bottom: 2px solid var(--brand);
  color: var(--brand);
  font-weight: 600;
}

.pill {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
}

/* Social share buttons */
.share-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  border: none;
  border-radius: 9999px !important; /* override global 4px radius */
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.share-btn:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
  filter: brightness(1.05);
}
.share-btn:active {
  transform: translateY(-1px) scale(1.02);
}
.share-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Copy-link button */
.copy-link-btn {
  border: 1.5px solid #cbd5e1;
  background: #fff;
  color: var(--ink);
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .12s ease;
}
.copy-link-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.copy-link-btn:active {
  transform: scale(0.97);
}
.copy-link-btn.copied {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}
.copy-link-btn.copied:hover {
  color: #fff;
}
.copy-link-btn .check-ic {
  display: none;
}
.copy-link-btn.copied .copy-ic {
  display: none;
}
.copy-link-btn.copied .check-ic {
  display: inline-block;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
}
::-webkit-scrollbar-track {
  background: transparent;
}

.fade-in {
  animation: fadeIn .35s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.spinner {
  border: 3px solid #e2e8f0;
  border-top-color: var(--brand);
  width: 28px;
  height: 28px;
  animation: spin .7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 639px) {
  main {
    padding-bottom: 1rem;
  }
}

/* Dynamic Menu Styles for WordPress header.php */
.hidden.md\:flex.items-center.gap-6.text-sm.font-medium.text-slate-600 ul {
  display: flex;
  gap: 1.5rem;
}
.hidden.md\:flex.items-center.gap-6.text-sm.font-medium.text-slate-600 ul li {
  list-style: none;
}
.hidden.md\:flex.items-center.gap-6.text-sm.font-medium.text-slate-600 ul li a {
  color: #475569;
  transition: color 0.15s ease;
  text-decoration: none;
}
.hidden.md\:flex.items-center.gap-6.text-sm.font-medium.text-slate-600 ul li a:hover {
  color: var(--brand);
}

/* Dynamic Mobile Menu Styles */
#mobileNav ul {
  display: flex;
  flex-direction: column;
}
#mobileNav ul li {
  list-style: none;
}
#mobileNav ul li a {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease, color 0.15s ease;
  text-decoration: none;
}
#mobileNav ul li a:hover {
  background-color: #f8fafc;
  color: var(--brand);
}

/* WordPress Content and Reading Styles for page.php and single.php */
.post-content p {
  margin-bottom: 1.25rem;
  line-height: 1.75;
}
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.3;
}
.post-content h1 {
  font-size: 2.25rem;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
}
.post-content h2 {
  font-size: 1.75rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.post-content h3 {
  font-size: 1.375rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
.post-content ul {
  list-style-type: disc;
  margin-left: 1.5rem;
  margin-bottom: 1.25rem;
  line-height: 1.75;
}
.post-content ol {
  list-style-type: decimal;
  margin-left: 1.5rem;
  margin-bottom: 1.25rem;
  line-height: 1.75;
}
.post-content li {
  margin-bottom: 0.5rem;
}
.post-content blockquote {
  border-left: 4px solid var(--brand);
  padding-left: 1rem;
  font-style: italic;
  color: #475569;
  margin: 1.5rem 0 1.5rem 1rem;
}
.post-content pre {
  background-color: #f1f5f9;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
  border-radius: 4px;
}
.post-content code {
  background-color: #f1f5f9;
  font-family: monospace;
  padding: 0.2rem 0.4rem;
  font-size: 0.875rem;
  border-radius: 2px;
}
.post-content img {
  max-width: 100%;
  height: auto;
  margin-bottom: 1.5rem;
}
.post-content a {
  color: var(--brand);
  text-decoration: underline;
}
.post-content a:hover {
  color: var(--brand-dark);
}

/* Footer */
.footer-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 1rem;
}

/* Footer navigation menu (rendered by wp_nav_menu) */
.footer-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin: 0;
  padding: 0;
}
.footer-nav ul li {
  list-style: none;
}
.footer-nav ul li a {
  display: inline-flex;
  align-items: center;
  color: #64748b; /* slate-500 */
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease, padding-left 0.15s ease;
}
.footer-nav ul li a:hover {
  color: var(--brand);
  padding-left: 4px;
}

/* Footer social icons */
.footer-social {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.footer-social a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  border: 1px solid #e2e8f0;
  background: #fff;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.footer-social a:hover {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  transform: translateY(-2px);
}

/* Footer bottom bar */
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8; /* slate-400 */
}
.footer-made {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}
@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    text-align: left;
  }
}
