/*
Theme Name: WindCodex
Theme URI: https://windcodex.com
Author: WindCodex
Author URI: https://windcodex.com
Description: High-performance WooCommerce plugin product theme. Built for the WindCodex Growth Suite — featuring Tailwind CSS, WooCommerce, and Elementor integration.
Version: 1.0.1
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: windcodex
Tags: woocommerce, custom-menu, custom-logo, full-width-template, blog, e-commerce
*/

/* ─────────────────────────────────────────────────────────
   Custom utilities not covered by Tailwind CDN
   ───────────────────────────────────────────────────────── */

/* Push content below the fixed navbar only on pages that actually render it */
body {
  margin: 0;
}

body:has(#wc-navbar) {
  padding-top: 4rem;
}

/* Brand token */
:root {
  --wc-primary:   #6347eb;
  --wc-secondary: #2e266d;
  --wc-font:      'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
}

/* Animations used across the theme */
@keyframes wc-float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
@keyframes wc-pulse-badge {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
@keyframes wc-spin-slow {
  to { transform: rotate(360deg); }
}

.animate-float   { animation: wc-float 4s ease-in-out infinite; }
.animate-spin-slow { animation: wc-spin-slow 20s linear infinite; }

/* Line-clamp utilities (Safari < 15 fallback) */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Admin bar offset for fixed navbar ──────────────────────────────── */
/* WP injects both html{margin-top:32px} and html.wp-toolbar{padding-top:32px}
   when the admin bar is active. That double-offsets the body content to 128px
   while our navbar only reaches 96px — producing a 32px gap. Cancel the
   padding here; the navbar top:32px rule below handles visual alignment. */
html.wp-toolbar {
  padding-top: 0 !important;
}

/* WP admin bar is 32px tall on desktop, 46px on mobile (≤782px) */
body.admin-bar #wc-navbar {
  top: 32px;
}
@media screen and (max-width: 782px) {
  body.admin-bar #wc-navbar {
    top: 46px;
  }
}

/* WordPress-required alignment */
.alignnone  { margin: 5px 20px 20px 0; }
.aligncenter { display: block; margin: 5px auto; }
.alignright  { float: right; margin: 5px 0 20px 20px; }
.alignleft   { float: left;  margin: 5px 20px 20px 0; }
.wp-caption  { max-width: 100%; }
.wp-caption .wp-caption-text { font-size: 0.875rem; color: #64748b; margin-top: 0.5rem; }

/* ── Blog pagination ────────────────────────────────────────────────── */
.windcodex-blog-pagination .page-numbers {
  display: none;
}
.windcodex-blog-pagination ul {
  display: flex;
  align-items: center;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.windcodex-blog-pagination ul li a,
.windcodex-blog-pagination ul li span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  font-size: 0.875rem;
  font-weight: 700;
  color: #475569;
  background: #fff;
  text-decoration: none;
  transition: all 0.15s;
}
.windcodex-blog-pagination ul li a:hover {
  border-color: #6347eb;
  color: #6347eb;
  background: #faf9ff;
}
.windcodex-blog-pagination ul li span.current {
  background: #6347eb;
  border-color: #6347eb;
  color: #fff;
}
.windcodex-blog-pagination ul li a.prev,
.windcodex-blog-pagination ul li a.next {
  color: #64748b;
}

/* ── Single post prose styles ───────────────────────────────────────── */
.windcodex-prose {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #334155;
}
.windcodex-prose h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.windcodex-prose h3 {
  font-size: 1.375rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.windcodex-prose h4 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.windcodex-prose p {
  margin-bottom: 1.5rem;
}
.windcodex-prose a {
  color: #6347eb;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.windcodex-prose a:hover {
  opacity: 0.8;
}
.windcodex-prose ul,
.windcodex-prose ol {
  margin: 0 0 1.5rem 1.5rem;
}
.windcodex-prose ul { list-style-type: disc; }
.windcodex-prose ol { list-style-type: decimal; }
.windcodex-prose li {
  margin-bottom: 0.5rem;
}
.windcodex-prose blockquote {
  border-left: 4px solid #6347eb;
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: #faf9ff;
  border-radius: 0 1rem 1rem 0;
  color: #475569;
  font-style: italic;
}
.windcodex-prose code {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  padding: 0.15em 0.4em;
  font-size: 0.875em;
  color: #6347eb;
}
.windcodex-prose pre {
  background: #0f172a;
  border-radius: 1rem;
  padding: 1.5rem;
  overflow-x: auto;
  margin: 2rem 0;
}
.windcodex-prose pre code {
  background: transparent;
  border: none;
  color: #e2e8f0;
  padding: 0;
  font-size: 0.875rem;
}
.windcodex-prose img {
  border-radius: 1.5rem;
  max-width: 100%;
  margin: 2rem auto;
}
.windcodex-prose hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 2.5rem 0;
}
.windcodex-prose strong { color: #0f172a; font-weight: 700; }
.windcodex-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9375rem;
}
.windcodex-prose th {
  background: #f8fafc;
  font-weight: 700;
  color: #0f172a;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid #e2e8f0;
}
.windcodex-prose td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
}

/* Gutenberg page content fallback styles */
.windcodex-page-content > *:first-child {
  margin-top: 0;
}
.windcodex-page-content > *:last-child {
  margin-bottom: 0;
}
.windcodex-page-content h1,
.windcodex-page-content h2,
.windcodex-page-content h3,
.windcodex-page-content h4,
.windcodex-page-content h5,
.windcodex-page-content h6 {
  font-family: var(--wc-font);
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.windcodex-page-content h1 {
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  line-height: 1.1;
  margin: 0 0 1.5rem;
}
.windcodex-page-content h2 {
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  line-height: 1.2;
  margin: 3rem 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}
.windcodex-page-content h3 {
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  line-height: 1.3;
  margin: 2rem 0 0.75rem;
}
.windcodex-page-content h4,
.windcodex-page-content h5,
.windcodex-page-content h6 {
  font-size: 1.125rem;
  line-height: 1.4;
  margin: 1.5rem 0 0.5rem;
}
.windcodex-page-content p,
.windcodex-page-content ul,
.windcodex-page-content ol,
.windcodex-page-content pre,
.windcodex-page-content table,
.windcodex-page-content figure,
.windcodex-page-content .wp-block-group,
.windcodex-page-content .wp-block-columns,
.windcodex-page-content .wp-block-cover,
.windcodex-page-content .wp-block-media-text {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
}
.windcodex-page-content .wp-block-group:first-child,
.windcodex-page-content .wp-block-columns:first-child {
  margin-top: 0;
}
.windcodex-page-content .wp-block-columns {
  gap: 2rem;
}
.windcodex-page-content .wp-block-column > *:first-child {
  margin-top: 0;
}
.windcodex-page-content .wp-block-column > *:last-child {
  margin-bottom: 0;
}
.windcodex-page-content .wp-block-image img,
.windcodex-page-content .wp-block-cover,
.windcodex-page-content .wp-block-media-text img {
  border-radius: 1.5rem;
}
.windcodex-page-content .wp-block-image {
  margin-left: 0;
  margin-right: 0;
}
.windcodex-page-content .wp-block-image figcaption,
.windcodex-page-content .wp-block-table figcaption {
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 0.75rem;
}
.windcodex-page-content .wp-block-quote,
.windcodex-page-content blockquote {
  border-left: 4px solid #6347eb;
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: #faf9ff;
  border-radius: 0 1rem 1rem 0;
  color: #475569;
}
.windcodex-page-content .wp-block-separator {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 2.5rem 0;
}
.windcodex-page-content .wp-block-button {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}
.windcodex-page-content .wp-block-button__link {
  border-radius: 9999px;
  padding: 0.9rem 1.4rem;
  font-weight: 700;
  text-decoration: none;
}
.windcodex-page-content .wp-block-pullquote {
  margin: 2.5rem 0;
  padding: 2rem;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}
.windcodex-page-content .wp-block-pullquote blockquote {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
}
.windcodex-page-content .wp-block-table {
  overflow-x: auto;
}
.windcodex-page-content .wp-block-table table {
  min-width: 100%;
}
.windcodex-page-content .alignwide,
.windcodex-page-content .alignfull {
  width: 100%;
  max-width: 100%;
}
@media (max-width: 781px) {
  .windcodex-page-content .wp-block-columns {
    gap: 1.25rem;
  }
}

/* Contact Form 7 theme styling */
.windcodex-cf7 .wpcf7 {
  width: 100%;
}
.windcodex-cf7 .wpcf7 form {
  display: block;
}
.windcodex-cf7 .wpcf7 p {
  margin: 0 0 1.5rem;
}
.windcodex-cf7 .wpcf7 p:last-of-type {
  margin-bottom: 0;
}
.windcodex-cf7 .wpcf7 label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #64748b;
  margin-bottom: 0.5rem;
  padding-inline: 0.25rem;
}
.windcodex-cf7 .wpcf7-form-control-wrap {
  display: block;
  margin-top: 0.5rem;
}
.windcodex-cf7 .wpcf7 input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.windcodex-cf7 .wpcf7 select,
.windcodex-cf7 .wpcf7 textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  box-sizing: border-box;
}
.windcodex-cf7 .wpcf7 textarea {
  min-height: 9rem;
  resize: vertical;
}
.windcodex-cf7 .wpcf7 input:not([type="submit"]):focus,
.windcodex-cf7 .wpcf7 select:focus,
.windcodex-cf7 .wpcf7 textarea:focus {
  border-color: #6347eb;
  box-shadow: 0 0 0 4px rgba(99, 71, 235, 0.12);
}
.windcodex-cf7 .wpcf7 input::placeholder,
.windcodex-cf7 .wpcf7 textarea::placeholder {
  color: #94a3b8;
}
.windcodex-cf7 .wpcf7 input[type="submit"] {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.25rem;
  border: 0;
  border-radius: 0.75rem;
  background: #6347eb;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 14px 30px -12px rgba(99, 71, 235, 0.4);
}
.windcodex-cf7 .wpcf7 input[type="submit"]:hover {
  opacity: 0.92;
}
.windcodex-cf7 .wpcf7 input[type="submit"]:disabled {
  opacity: 0.7;
  cursor: wait;
}
.windcodex-cf7 .wpcf7-spinner {
  margin: 0.75rem 0 0;
}
.windcodex-cf7 .wpcf7-not-valid-tip {
  font-size: 0.8125rem;
  color: #dc2626;
  margin-top: 0.5rem;
}
.windcodex-cf7 .wpcf7 form.invalid .wpcf7-response-output,
.windcodex-cf7 .wpcf7 form.unaccepted .wpcf7-response-output,
.windcodex-cf7 .wpcf7 form.payment-required .wpcf7-response-output {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}
.windcodex-cf7 .wpcf7 form.sent .wpcf7-response-output {
  border: 1px solid #bbf7d0;
  background: #ecfdf5;
  color: #047857;
}
.windcodex-cf7 .wpcf7-response-output {
  margin: 1.25rem 0 0;
  padding: 0.9rem 1rem;
  border-radius: 0.95rem;
  font-size: 0.9375rem;
}
.windcodex-cf7 .wpcf7 form.submitting .wpcf7-response-output {
  display: none;
}
