/*
 * PrimeWebKit brand overrides for Storefront + WooCommerce.
 * Every token below is copied from chat.primewebkit.com's own design
 * system (src/app/globals.css, and the Button/Input/Card components)
 * so this checkout site reads as the same product, pixel-for-pixel
 * where WooCommerce's markup allows it — not just "similar colors".
 */

:root {
  --pwk-bg: #ffffff;
  --pwk-fg: #14141c;
  --pwk-muted-fg: #6b7280;
  --pwk-border: #e5e7eb;
  --pwk-border-strong: #d1d5db;
  --pwk-surface: #fbfbfd;
  --pwk-surface-2: #f4f4f7;
  --pwk-muted: #f4f4f7;

  --pwk-primary: #4f46e5;
  --pwk-primary-hover: #4338ca;
  --pwk-primary-fg: #ffffff;
  --pwk-accent: #a855f7;

  --pwk-success: #16a34a;
  --pwk-danger: #dc2626;

  /* Card / section radius (Card component: rounded-2xl = 1.5rem) */
  --pwk-radius-2xl: 24px;
  /* Input / small control radius (Input component: rounded-lg = 0.5rem) */
  --pwk-radius-lg: 8px;

  --pwk-font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --pwk-font-display: "Sora", var(--pwk-font-body);

  /* Shadow tokens, copied from --shadow-color: 265 20% 40% */
  --pwk-shadow-sm: 0 1px 2px rgba(48, 42, 74, 0.06);
  --pwk-shadow-md: 0 4px 16px -4px rgba(48, 42, 74, 0.14), 0 2px 6px -2px rgba(48, 42, 74, 0.09);
  --pwk-shadow-glow: 0 0 0 1px rgba(48, 42, 74, 0.05), 0 8px 30px -6px rgba(79, 70, 229, 0.35);
}

* {
  box-sizing: border-box;
}

/* ---------------------------------------------------------------- */
/* Base typography                                                   */
/* ---------------------------------------------------------------- */

body {
  background: var(--pwk-bg);
  color: var(--pwk-fg);
  font-family: var(--pwk-font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.woocommerce-Tabs-panel h2,
.entry-title,
.page-title {
  font-family: var(--pwk-font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--pwk-fg);
}

a {
  color: var(--pwk-primary);
}
a:hover {
  color: var(--pwk-primary-hover);
}

/* ---------------------------------------------------------------- */
/* Header / logo mark — replicates the site-header brand mark on     */
/* chat.primewebkit.com: a small primary-colored rounded square with */
/* a chat-bubble icon, followed by the site title text. If you'd     */
/* rather use an uploaded image instead, set one under Appearance →  */
/* Customize → Site Identity → Logo — that takes over automatically  */
/* and this CSS icon simply won't apply.                             */
/* ---------------------------------------------------------------- */

.site-header {
  background: var(--pwk-bg);
  border-bottom: 1px solid var(--pwk-border);
  box-shadow: none;
}

.site-branding .site-title,
.site-branding .site-title a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--pwk-font-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--pwk-fg);
}

.site-branding .site-title a::before {
  content: "";
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 10px;
  background-color: var(--pwk-primary);
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22white%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M2.992%2016.342a2%202%200%200%201%20.094%201.167l-1.065%203.29a1%201%200%200%200%201.236%201.168l3.413-.998a2%202%200%200%201%201.099.092%2010%2010%200%201%200-4.777-4.719%22/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
}

.site-description {
  color: var(--pwk-muted-fg);
  font-size: 0.875rem;
}

.main-navigation ul li a {
  font-family: var(--pwk-font-body);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--pwk-fg);
}
.main-navigation ul li a:hover {
  color: var(--pwk-primary);
}

/* ---------------------------------------------------------------- */
/* Buttons — the real site uses fully-rounded (pill) buttons, not    */
/* rounded rectangles. This is the single biggest "doesn't match     */
/* yet" gap in a default WooCommerce theme.                          */
/* ---------------------------------------------------------------- */

.button,
button,
input[type="submit"],
input[type="button"],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
#place_order,
.checkout-button,
.wc-proceed-to-checkout .checkout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--pwk-primary);
  color: var(--pwk-primary-fg) !important;
  border: none;
  border-radius: 9999px;
  font-family: var(--pwk-font-body);
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1;
  height: 44px;
  padding: 0 1.5rem;
  box-shadow: var(--pwk-shadow-md);
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
  cursor: pointer;
}

.button:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
#place_order:hover,
.checkout-button:hover {
  background: var(--pwk-primary-hover);
  color: var(--pwk-primary-fg) !important;
  box-shadow: var(--pwk-shadow-glow);
}

.button:active,
button:active,
#place_order:active {
  transform: scale(0.98);
}

/* Secondary/outline-style buttons WooCommerce sometimes renders
   (e.g. "Continue shopping", coupon toggle) — keep them visually
   secondary rather than all-primary. */
.woocommerce a.button.wc-backward,
.showcoupon,
.woocommerce-cart .coupon .button {
  background: var(--pwk-surface-2);
  color: var(--pwk-fg) !important;
  box-shadow: none;
  border: 1px solid var(--pwk-border);
}
.woocommerce a.button.wc-backward:hover,
.showcoupon:hover {
  background: var(--pwk-muted);
  box-shadow: none;
}

/* ---------------------------------------------------------------- */
/* Cards, panels, checkout, cart                                     */
/* ---------------------------------------------------------------- */

.woocommerce-checkout #customer_details,
.woocommerce-checkout .woocommerce-checkout-review-order,
.woocommerce-cart-form,
.cart-collaterals .cart_totals,
.woocommerce-order,
ul.products li.product {
  border-radius: var(--pwk-radius-2xl);
  border: 1px solid var(--pwk-border);
  background: var(--pwk-bg);
  box-shadow: var(--pwk-shadow-sm);
  padding: 1.5rem;
}

.woocommerce-checkout-review-order-table,
table.shop_table {
  border-radius: var(--pwk-radius-lg);
  border-collapse: separate;
  border: 1px solid var(--pwk-border);
  overflow: hidden;
}
table.shop_table th {
  background: var(--pwk-surface-2);
  font-family: var(--pwk-font-display);
  font-weight: 600;
}

.woocommerce-checkout-review-order-table .order-total .amount,
.woocommerce-Price-amount {
  color: var(--pwk-fg);
  font-weight: 600;
}

/* ---------------------------------------------------------------- */
/* Form fields — matches the Input component exactly: rounded-lg,    */
/* border, subtle shadow, 2px primary focus ring.                    */
/* ---------------------------------------------------------------- */

.woocommerce form .form-row label,
.woocommerce-checkout label {
  font-family: var(--pwk-font-body);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--pwk-fg);
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce-checkout select,
.select2-container .select2-selection,
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout input[type="email"] {
  border: 1px solid var(--pwk-border);
  border-radius: var(--pwk-radius-lg);
  background: var(--pwk-surface);
  box-shadow: var(--pwk-shadow-sm);
  font-family: var(--pwk-font-body);
  font-size: 0.9rem;
  height: 42px;
  padding: 0 0.85rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.woocommerce form .form-row textarea {
  height: auto;
  padding: 0.65rem 0.85rem;
}
.select2-container .select2-selection {
  height: 42px !important;
  display: flex;
  align-items: center;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce-checkout select:focus {
  border-color: var(--pwk-primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.35);
}

.woocommerce form .form-row {
  margin-bottom: 1.1rem;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--pwk-primary);
}

/* ---------------------------------------------------------------- */
/* Notices, badges, subscription price strings                       */
/* ---------------------------------------------------------------- */

.woocommerce-message,
.woocommerce-info {
  border-top-color: var(--pwk-primary);
  border-radius: var(--pwk-radius-lg);
}
.woocommerce-message::before,
.woocommerce-info::before {
  color: var(--pwk-primary);
}
.woocommerce-error {
  border-top-color: var(--pwk-danger);
  border-radius: var(--pwk-radius-lg);
}
.woocommerce-error::before {
  color: var(--pwk-danger);
}

.subscription-details,
.subscription_details,
span.subscription-price {
  color: var(--pwk-muted-fg);
}

/* ---------------------------------------------------------------- */
/* Footer                                                             */
/* ---------------------------------------------------------------- */

#colophon,
.site-footer {
  background: var(--pwk-surface-2);
  border-top: 1px solid var(--pwk-border);
  color: var(--pwk-muted-fg);
}
#colophon a,
.site-footer a {
  color: var(--pwk-fg);
}

/* Storefront's default demo widgets/handheld footer bar aren't
   relevant to a single-purpose checkout site — hidden via functions.php,
   this just cleans up any remaining default spacing/borders around it. */
.storefront-handheld-footer-bar {
  display: none !important;
}
