/*
Theme Name: Wojciech Woźnica
Theme URI: https://wojciechwoznica.pl
Author: iarea.pl
Description: Prosty motyw: strona w trakcie budowy, formularz analizy strony (Contact Form 7) i strony prawne. Projekt wg prototypu Lovable.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: wojciechwoznica
*/

:root {
  --radius: 0.625rem;
  --background: oklch(1 0 0);
  --foreground: oklch(0.129 0.042 264.695);
  --card: oklch(1 0 0);
  --primary: oklch(0.208 0.042 265.755);
  --primary-foreground: oklch(0.984 0.003 247.858);
  --muted: oklch(0.968 0.007 247.896);
  --muted-foreground: oklch(0.554 0.046 257.417);
  --destructive: oklch(0.577 0.245 27.325);
  --border: oklch(0.929 0.013 255.508);
  --input: oklch(0.929 0.013 255.508);
}

*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }

body {
  margin: 0;
  background-color: var(--background);
  color: var(--foreground);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, p { margin: 0; }

/* Strona w trakcie budowy */
.ww-center {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  text-align: center;
}
.ww-center h1 { font-size: 1.875rem; line-height: 2.25rem; font-weight: 600; letter-spacing: -0.025em; }
.ww-center p { margin-top: 0.5rem; color: var(--muted-foreground); }

/* Strony prawne */
.ww-legal { min-height: 100vh; padding: 4rem 1rem; }
.ww-legal article { max-width: 42rem; margin: 0 auto; font-size: 0.875rem; line-height: 1.625; color: var(--muted-foreground); }
.ww-legal article > * + * { margin-top: 1rem; }
.ww-legal h1 { font-size: 1.875rem; line-height: 2.25rem; font-weight: 600; letter-spacing: -0.025em; color: var(--foreground); }
.ww-legal h2, .ww-legal h3 { color: var(--foreground); font-weight: 600; }
.ww-legal a { color: var(--foreground); text-decoration: underline; text-underline-offset: 2px; }

/* Formularz analizy strony */
.ww-qr {
  position: relative;
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 3rem 1rem;
  background-color: color-mix(in oklab, var(--muted) 40%, transparent);
}
.ww-qr::before {
  content: "";
  position: absolute;
  top: -10rem;
  left: 50%;
  width: 480px;
  height: 480px;
  transform: translateX(-50%);
  border-radius: 9999px;
  background: color-mix(in oklab, var(--primary) 10%, transparent);
  filter: blur(64px);
  pointer-events: none;
}
.ww-qr__wrap { position: relative; width: 100%; max-width: 440px; }
.ww-card {
  border: 1px solid var(--border);
  border-radius: 1.375rem;
  background: var(--card);
  padding: 2rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 40px -12px rgba(0,0,0,.12);
}
@media (min-width: 640px) { .ww-card { padding: 2.5rem; } }
.ww-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  background: color-mix(in oklab, var(--primary) 10%, transparent);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary);
}
.ww-card h1 { margin-top: 1rem; font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -0.025em; }
.ww-card .ww-lead { margin-top: 0.5rem; font-size: 0.875rem; line-height: 1.625; color: var(--muted-foreground); }
.ww-note { margin-top: 1.5rem; text-align: center; font-size: 0.75rem; color: var(--muted-foreground); }

.ww-card .wpcf7 { margin-top: 2rem; }
.ww-card .wpcf7-form > p { margin: 0 0 1.25rem; }
.ww-card .wpcf7-form label.ww-label { display: block; margin-bottom: 0.375rem; font-size: 0.875rem; font-weight: 500; }
.ww-card .wpcf7-form-control-wrap { display: block; }

.ww-card input[type="email"],
.ww-card input[type="text"] {
  height: 3rem;
  width: 100%;
  border: 1px solid var(--input);
  border-radius: 0.875rem;
  background-color: var(--background);
  background-repeat: no-repeat;
  background-position: 1rem center;
  background-size: 18px 18px;
  padding: 0 1rem 0 2.75rem;
  font: inherit;
  font-size: 15px;
  color: var(--foreground);
  outline: none;
  transition: all .15s;
}
.ww-card input::placeholder { color: color-mix(in oklab, var(--muted-foreground) 70%, transparent); }
.ww-card input[type="email"]:focus,
.ww-card input[type="text"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--primary) 15%, transparent);
}
.ww-card input[type="email"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7a90' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='16' x='2' y='4' rx='2'/%3E%3Cpath d='m22 7-10 6L2 7'/%3E%3C/svg%3E");
}
.ww-card input[name="site-url"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7a90' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E");
}

.ww-card .wpcf7-acceptance .wpcf7-list-item { margin: 0; }
.ww-card .wpcf7-acceptance label { display: flex; align-items: flex-start; gap: 0.75rem; cursor: pointer; }
.ww-card .wpcf7-acceptance input { margin: 0.125rem 0 0; width: 18px; height: 18px; flex-shrink: 0; cursor: pointer; accent-color: var(--primary); }
.ww-card .wpcf7-acceptance .wpcf7-list-item-label { font-size: 0.75rem; line-height: 1.625; color: var(--muted-foreground); }
.ww-card .wpcf7-acceptance a { font-weight: 500; color: var(--foreground); text-decoration: underline; text-underline-offset: 2px; }
.ww-card .wpcf7-acceptance a:hover { color: var(--primary); }

.ww-card input[type="submit"] {
  display: flex;
  height: 3rem;
  width: 100%;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.875rem;
  background: var(--primary);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--primary-foreground);
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  cursor: pointer;
  transition: all .15s;
}
.ww-card input[type="submit"]:hover { background: color-mix(in oklab, var(--primary) 90%, transparent); }
.ww-card input[type="submit"]:active { transform: scale(.99); }
.ww-card input[type="submit"]:focus-visible { outline: none; box-shadow: 0 0 0 4px color-mix(in oklab, var(--primary) 25%, transparent); }
.ww-card input[type="submit"]:disabled { opacity: .7; cursor: default; }
.ww-card .wpcf7-spinner { display: none; }

.ww-card .wpcf7-not-valid-tip { margin-top: 0.375rem; font-size: 0.75rem; color: var(--destructive); }
.ww-card input.wpcf7-not-valid { border-color: var(--destructive); }
.ww-card .wpcf7-response-output {
  margin: 1.25rem 0 0 !important;
  border: 0 !important;
  padding: 0 !important;
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--muted-foreground);
}
.ww-card .wpcf7 form.sent .wpcf7-response-output { font-weight: 500; color: var(--foreground); }
.ww-card .wpcf7 form.invalid .wpcf7-response-output,
.ww-card .wpcf7 form.failed .wpcf7-response-output { color: var(--destructive); }
.ww-card .wpcf7-turnstile, .ww-card .cf-turnstile { margin-bottom: 1.25rem; }

/* Cookies / Consent Mode */
.ww-footer { position: fixed; bottom: 0.75rem; left: 0; right: 0; margin: 0; text-align: center; font-size: 0.75rem; color: var(--muted-foreground); pointer-events: none; }
.ww-footer a { pointer-events: auto; color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.ww-footer a:hover { color: var(--foreground); }
.ww-consent { position: fixed; inset: auto 0 0 0; z-index: 9999; display: flex; justify-content: center; padding: 1rem; }
.ww-consent[hidden] { display: none; }
.ww-consent__box { width: 100%; max-width: 40rem; border: 1px solid var(--border); border-radius: 1.375rem; background: var(--card); padding: 1.25rem 1.5rem; box-shadow: 0 12px 40px -12px rgba(0,0,0,.25); }
.ww-consent h2 { font-size: 1rem; font-weight: 600; }
.ww-consent p { margin-top: 0.5rem; font-size: 0.8125rem; line-height: 1.6; color: var(--muted-foreground); }
.ww-consent a { color: var(--foreground); text-decoration: underline; text-underline-offset: 2px; }
.ww-consent__prefs { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 0.75rem; font-size: 0.8125rem; }
.ww-consent__prefs[hidden], .ww-consent__actions [hidden] { display: none; }
.ww-consent__prefs label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.ww-consent__prefs input { accent-color: var(--primary); }
.ww-consent__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }
.ww-consent__actions button { height: 2.5rem; border: 1px solid var(--input); border-radius: 0.875rem; background: var(--background); padding: 0 1rem; font: inherit; font-size: 0.8125rem; font-weight: 500; color: var(--foreground); cursor: pointer; }
.ww-consent__actions button:hover { background: var(--muted); }
.ww-consent__actions button:focus-visible { outline: none; box-shadow: 0 0 0 4px color-mix(in oklab, var(--primary) 25%, transparent); }
.ww-consent__actions .is-primary { border-color: var(--primary); background: var(--primary); color: var(--primary-foreground); }
.ww-consent__actions .is-primary:hover { background: color-mix(in oklab, var(--primary) 90%, transparent); }
@media (max-width: 479px) { .ww-consent__actions button { flex: 1 1 100%; } }

/* Tabele i znaczniki w stronach prawnych */
.ww-legal table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.ww-legal th, .ww-legal td { border: 1px solid var(--border); padding: 0.5rem 0.75rem; text-align: left; vertical-align: top; }
.ww-legal th { background: var(--muted); color: var(--foreground); font-weight: 600; }
.ww-legal h2 { margin-top: 2rem; font-size: 1.125rem; }
.ww-legal ul { padding-left: 1.25rem; }
.ww-legal code { font-size: 0.8125rem; background: var(--muted); padding: 0.125rem 0.375rem; border-radius: 0.375rem; }
.ww-legal mark { background: #fff3bf; color: #5c4a00; padding: 0 0.25rem; border-radius: 0.25rem; }
@media (max-width: 639px) { .ww-legal table { display: block; overflow-x: auto; } }

/* Strona podziekowania */
.ww-thanks { text-align: center; }
.ww-thanks__icon { display: flex; width: 3.5rem; height: 3.5rem; margin: 0 auto; align-items: center; justify-content: center; border-radius: 9999px; background: color-mix(in oklab, var(--primary) 10%, transparent); color: var(--primary); }
.ww-thanks h1 { margin-top: 1.25rem; font-size: 1.5rem; }
.ww-thanks__link { display: inline-block; margin-top: 1.5rem; font-size: 0.875rem; font-weight: 500; color: var(--primary); text-decoration: none; }
.ww-thanks__link:hover { text-decoration: underline; }

/* Przycisk-link na stronie glownej */
.ww-center .ww-btn { display: inline-flex; height: 3rem; align-items: center; justify-content: center; margin-top: 1.5rem; border-radius: 0.875rem; background: var(--primary); padding: 0 1.5rem; font-size: 15px; font-weight: 500; color: var(--primary-foreground); text-decoration: none; box-shadow: 0 1px 2px rgba(0,0,0,.05); transition: all .15s; }
.ww-center .ww-btn:hover { background: color-mix(in oklab, var(--primary) 90%, transparent); }
.ww-center .ww-btn:focus-visible { outline: none; box-shadow: 0 0 0 4px color-mix(in oklab, var(--primary) 25%, transparent); }

/* CF7: autop wstawia <br> miedzy etykieta a polem - niepotrzebny odstep */
.ww-card .wpcf7-form br { display: none; }
