/* Wspólne dla /formatowanie-listy-sql-in/ i /sql-in-list-formatter/ (PL i EN). */
:root {
  font-family: var(--font-sans);
  color: #172033;
  background: #f4f6fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --muted: #667085;
  --border: #e3e8f0;
  --primary: var(--brand);
  --primary-dark: var(--brand-dark);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, textarea { font: inherit; }

.contact-header { border-bottom: 1px solid #edecf2; background: #fff; }
.contact-header-inner { width: min(1160px, calc(100% - 48px)); min-height: 78px; display: flex; align-items: center; justify-content: space-between; margin: 0 auto; }
.contact-brand img { display: block; width: 145px; height: 64px; object-fit: cover; mix-blend-mode: multiply; }
.back-link { color: #5e55c8; font-size: 13px; font-weight: 700; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .back-link:hover { color: var(--brand-dark); } }

.site-footer { width: 100%; margin-top: 8px; padding: 22px 20px 26px; border-top: 1px solid #edecf2; background: #fbfbfd; }
.site-footer-inner { width: min(100%, 1120px); display: grid; justify-items: center; gap: 12px; margin: 0 auto; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.footer-links a { color: #777a89; font-size: 12px; font-weight: 650; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .footer-links a:hover { color: var(--primary); } }
.footer-legal-note { max-width: 900px; margin: 0; color: #626777; font-size: 12px; line-height: 1.6; text-align: center; }

.shell {
  width: min(820px, calc(100% - 40px));
  margin: 0 auto;
  padding: 52px 0 64px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 42px);
  letter-spacing: -.04em;
}

.intro {
  max-width: 660px;
  margin: 12px 0 28px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.panel {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 18px rgb(16 24 40 / 4%);
}

label {
  display: block;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
}

textarea {
  display: block;
  width: 100%;
  min-height: 220px;
  resize: vertical;
  padding: 14px;
  border: 1px solid #d7deea;
  border-radius: 10px;
  outline: none;
  background: #fbfcfe;
  color: #172033;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.65;
  transition: border-color .15s, box-shadow .15s;
}

textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(var(--brand-rgb) / 13%);
}

textarea::placeholder { color: #98a2b3; }

.hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 26px;
}

button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 650;
  transition: background .15s var(--ease-out), border-color .15s var(--ease-out), scale .16s var(--ease-out);
}

button:focus-visible { outline: 3px solid rgb(var(--brand-rgb) / 24%); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .5; }

.primary { background: var(--primary); color: #fff; }
@media (hover: hover) and (pointer: fine) { .primary:hover { background: var(--primary-dark); } }
.secondary { border-color: var(--border); background: #fff; color: #344054; }
@media (hover: hover) and (pointer: fine) { .secondary:hover { background: #f8f9fc; } }

.bazo-options { min-width: 0; margin: 16px 0 0; padding: 0; border: 0; }
.bazo-options legend { margin-bottom: 10px; padding: 0; font-size: 14px; font-weight: 700; }
.bazo-chips { display: flex; flex-wrap: wrap; gap: 8px; }
label.bazo-check, .bazo-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: #344054;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  user-select: none;
  transition: border-color .15s, background .15s;
}
@media (hover: hover) and (pointer: fine) { .bazo-check:hover { border-color: #c9c4f7; } }
.bazo-check:has(input[type="checkbox"]:checked) { border-color: #c9c4f7; background: #f5f4ff; color: #3c367e; }
.bazo-check input[type="checkbox"] { width: 15px; height: 15px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.bazo-custom input[type="text"] {
  width: 64px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid #d7deea;
  border-radius: 6px;
  outline: none;
  background: #fbfcfe;
  font-family: var(--font-mono);
  font-size: 13px;
}
.bazo-custom input[type="text"]:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgb(var(--brand-rgb) / 13%); }

.bazo-columns { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.bazo-columns-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
label.bazo-inline-field { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.bazo-inline-field input {
  width: 76px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #d7deea;
  border-radius: 8px;
  outline: none;
  background: #fbfcfe;
  color: #172033;
  font: inherit;
}
.bazo-inline-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgb(var(--brand-rgb) / 13%); }
.bazo-stepper { position: relative; display: inline-flex; }
.bazo-stepper input { padding-right: 26px; }
.bazo-stepper-buttons { position: absolute; top: 1px; right: 1px; bottom: 1px; display: flex; flex-direction: column; width: 20px; border-left: 1px solid #d7deea; border-radius: 0 7px 7px 0; overflow: hidden; }
.bazo-stepper button { flex: 1; min-height: 0; padding: 0; border: 0; border-radius: 0; background: #f1f3f8; color: #4b5468; font-size: 8px; line-height: 1; }
.bazo-stepper button + button { border-top: 1px solid #d7deea; }
@media (hover: hover) and (pointer: fine) { .bazo-stepper button:hover:not(:disabled) { background: #e6e4ff; color: var(--primary); } }
.bazo-stepper button:not(:disabled):active { scale: none; }
.bazo-stepper button:disabled { opacity: 1; background: #f7f8fb; color: #c9ced8; }
.bazo-table-wrap { max-width: 100%; max-height: 340px; margin-top: 10px; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--border); border-radius: 10px; }
.bazo-table thead th { position: sticky; top: 0; z-index: 1; box-shadow: inset 0 -1px 0 var(--border); }
.bazo-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bazo-table th, .bazo-table td { max-width: 220px; padding: 7px 10px; border-bottom: 1px solid #edf0f4; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.bazo-table tr:last-child td { border-bottom: 0; }
.bazo-table th { background: #f8f9fc; font-weight: 700; }
.bazo-table th label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; font-weight: 700; cursor: pointer; }
.bazo-table th input { width: 15px; height: 15px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.bazo-table td { font-family: var(--font-mono); }
.bazo-table .is-selected { background: #f5f4ff; color: #2b2566; }
.bazo-table th.is-selected { background: #ebe9ff; }
.bazo-table .is-off { color: #a3aab8; }
.bazo-table .is-empty::after { color: #c3c8d2; content: "—"; }

.reverse {
  margin-top: 28px;
  border: 1px solid var(--brand);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 18px rgb(16 24 40 / 4%);
}

.reverse summary {
  position: relative;
  padding: 17px 20px;
  border-radius: 16px;
  color: #344054;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  list-style: none;
  text-align: center;
}

.reverse summary::-webkit-details-marker { display: none; }

.reverse summary::after {
  position: absolute;
  top: 50%;
  right: 20px;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: translateY(-70%) rotate(45deg);
  transition: transform .15s var(--ease-out);
}

.reverse[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}

@media (hover: hover) and (pointer: fine) { .reverse summary:hover { background: #f8f9fc; } }
.reverse[open] summary { border-bottom: 1px solid var(--border); border-radius: 16px 16px 0 0; }
.reverse-content { padding: 20px; }
.reverse-content .actions { margin-bottom: 18px; }

.result {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 18px rgb(16 24 40 / 4%);
}

.result-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
}

h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.result-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.support-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 10px 14px;
  border: 1px solid #eceaf6;
  border-radius: 10px;
  color: #6b6884;
  background: #fbfaff;
  font-size: 12px;
  line-height: 1.5;
}
.support-banner p { margin: 0; }
.support-banner a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid #ddd8f7;
  border-radius: 999px;
  color: #5e55c8;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) { .support-banner a:hover { border-color: #c4bcf2; background: #f3f1ff; } }

#output {
  min-height: 100px;
  max-height: 320px;
  margin: 0;
  padding: 20px 22px;
  overflow: auto;
  color: #172033;
  background: #fbfcfe;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.bazo-seo { margin-top: 26px; padding-top: 12px; }
.bazo-seo-intro { margin-bottom: 18px; }
.bazo-seo h2 { margin: 0 0 12px; color: #292b40; font-size: clamp(26px, 3vw, 34px); letter-spacing: -.03em; }
.bazo-seo h3 { margin: 0 0 10px; color: #292b40; font-size: 18px; letter-spacing: -.02em; }
.bazo-seo p, .bazo-seo li, .bazo-faq-item p { color: #4b5565; font-size: 14px; line-height: 1.8; }
.bazo-seo-intro p { margin: 0; font-size: 15px; }
.bazo-seo-intro p + p { margin-top: 10px; }
.bazo-seo code { padding: 1px 4px; border-radius: 4px; color: #3c367e; background: #f0edff; font-size: .92em; }
.bazo-seo a { color: var(--brand); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .bazo-seo a:hover { color: var(--brand-dark); } }
.bazo-seo-card, .bazo-faq, .bazo-related { margin-top: 16px; padding: 20px 22px; border: 1px solid #e3e8f0; border-radius: 15px; background: #fff; box-shadow: 0 4px 18px rgb(16 24 40 / 4%); }
.bazo-seo-card ul { margin: 12px 0 0; padding-left: 20px; }
.bazo-seo-card li + li { margin-top: 8px; }
.bazo-faq > h3, .bazo-related > h3 { margin-bottom: 16px; font-size: 21px; }
.bazo-faq-item { padding: 0 0 14px; border-bottom: 1px solid #edf0f4; }
.bazo-faq-item + .bazo-faq-item { padding-top: 14px; }
.bazo-faq-item:last-child { padding-bottom: 0; border-bottom: 0; }
.bazo-faq-item summary { position: relative; padding-left: 28px; color: #292b40; font-size: 16px; font-weight: 700; line-height: 1.5; cursor: pointer; list-style: none; }
.bazo-faq-item summary::-webkit-details-marker { display: none; }
.bazo-faq-item summary::after { position: absolute; top: 9px; left: 7px; width: 7px; height: 7px; border-right: 2px solid #635bdf; border-bottom: 2px solid #635bdf; content: ""; transform: rotate(45deg); transition: transform .2s var(--ease-out); }
.bazo-faq-item[open] summary::after { transform: rotate(225deg); }
.bazo-faq-item summary:focus-visible { outline: 3px solid rgb(var(--brand-rgb) / 24%); outline-offset: 3px; }
.bazo-faq-item p { margin: 10px 0 0; }
.bazo-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.bazo-related-card { min-height: 175px; display: flex; flex-direction: column; align-items: flex-start; padding: 16px; border: 1px solid #eaebf1; border-radius: 13px; color: #292b40; background: #fff; text-decoration: none; box-shadow: 0 3px 10px rgb(28 33 66 / 2%); transition: transform .2s var(--ease-out), border-color .2s var(--ease-out), box-shadow .2s var(--ease-out), scale .16s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .bazo-related-card:hover { transform: translateY(-3px); border-color: #d9d3ff; box-shadow: 0 10px 24px rgb(54 45 112 / 8%); } }
.bazo-related-icon { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 10px; border-radius: 11px; font-size: 15px; font-weight: 750; }
.bazo-related-icon.violet { color: #695ade; background: #f0edff; }
.bazo-related-icon.blue { color: #4384d9; background: #eaf3ff; }
.bazo-related-icon.mint { color: #299d7b; background: #e9f8f2; }
.bazo-related-category { margin-bottom: 7px; color: #667085; font-size: 12px; font-weight: 700; }
.bazo-related-card strong { margin-bottom: 6px; font-size: 14px; line-height: 1.4; }
.bazo-related-description { color: #5f6475; font-size: 13px; line-height: 1.6; }
.bazo-back-to-tool { position: fixed; z-index: 10; right: max(20px, calc((100vw - 820px) / 2)); bottom: 22px; padding: 12px 16px; border: 1px solid var(--brand); border-radius: 999px; color: #fff; background: var(--brand); box-shadow: 0 6px 20px rgb(40 35 100 / 22%); font-size: 13px; font-weight: 700; text-decoration: none; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s var(--ease-out), transform .2s var(--ease-out), background .2s var(--ease-out), scale .16s var(--ease-out); }
.bazo-back-to-tool.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
@media (hover: hover) and (pointer: fine) { .bazo-back-to-tool:hover { color: #fff; background: var(--brand-dark); } }

@media (max-width: 600px) {
  .shell { width: min(100% - 28px, 560px); padding-top: 34px; }
  .contact-header-inner { width: min(100% - 30px, 440px); min-height: 68px; }
  .contact-brand img { width: 120px; height: 54px; }
  .back-link { font-size: 12px; }
  .site-footer { padding: 20px 16px 22px; }
  .site-footer-inner { gap: 10px; }
  .footer-links { gap: 10px 16px; }
  .footer-legal-note { font-size: 12px; }
  .result-heading { flex-direction: column; }
  .result-heading button { align-self: flex-start; }
  .support-banner { align-items: stretch; flex-direction: column; gap: 10px; }
  .support-banner a { align-self: flex-start; }
  #output { padding: 16px; }
  .reverse-content { padding: 16px; }
  .bazo-related-grid { grid-template-columns: 1fr; gap: 10px; }
  .bazo-related-card { min-height: 0; display: grid; grid-template-columns: 38px 1fr; column-gap: 12px; align-items: center; }
  .bazo-related-icon { grid-row: span 3; margin: 0; }
  .bazo-related-category, .bazo-related-card strong { margin: 0; }
  .bazo-back-to-tool { right: 15px; bottom: 15px; }
}
