/**
 * Plik: assets/css/pages/error.css
 *
 * Odpowiada za:
 * - stronę 404 / „nie znaleziono” w stylu Cercasa
 * - wyszukiwarkę, CTA, kategorie
 *
 * Nie umieszczać tutaj:
 * - logiki JS
 * - @import
 *
 * Powiązane pliki:
 * - templates/errors/404.tpl
 * - templates/errors/not-found.tpl
 */

body#pagenotfound {
  --cercasa-err-text: var(--cercasa-text, #1a1a1a);
  --cercasa-err-muted: var(--cercasa-text-muted, #5a605b);
  --cercasa-err-soft: var(--cercasa-text-soft, #8a908a);
  --cercasa-err-line: var(--cercasa-line, #e4e8e3);
  --cercasa-err-bg-soft: var(--cercasa-bg-soft, #f5f5f5);
  font-family: var(--cercasa-font-sans, "Poppins", sans-serif);
  color: var(--cercasa-err-text);
}

body#pagenotfound .btn-primary,
body#pagenotfound .btn-outline-primary,
.page-content--not-found.cercasa-error .btn-primary,
.page-content--not-found.cercasa-error .btn-outline-primary {
  --bs-btn-font-family: inherit;
  --bs-btn-border-radius: 0;
  --bs-btn-font-weight: 500;
  --bs-btn-padding-y: 0.7rem;
  --bs-btn-padding-x: 1.15rem;
}

body#pagenotfound .btn-primary,
.page-content--not-found.cercasa-error .btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: #111;
  --bs-btn-border-color: #111;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #000;
  --bs-btn-hover-border-color: #000;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #000;
  --bs-btn-active-border-color: #000;
}

body#pagenotfound .btn-outline-primary,
.page-content--not-found.cercasa-error .btn-outline-primary {
  --bs-btn-color: #111;
  --bs-btn-bg: transparent;
  --bs-btn-border-color: #cfd3d7;
  --bs-btn-hover-color: #000;
  --bs-btn-hover-bg: var(--cercasa-err-bg-soft);
  --bs-btn-hover-border-color: #b8bdc2;
  --bs-btn-active-color: #000;
  --bs-btn-active-bg: var(--cercasa-err-bg-soft);
  --bs-btn-active-border-color: #b8bdc2;
}

body#pagenotfound .columns-container {
  padding-block: 0;
}

body#pagenotfound #content.page-content,
body#pagenotfound .page-content {
  padding: 0;
}

body#pagenotfound .cercasa-error,
.page-content--not-found.cercasa-error {
  max-width: 40rem;
  margin-inline: auto;
  padding-block: 2rem 3rem;
  text-align: center;
}

body#pagenotfound .cercasa-error__card,
.page-content--not-found.cercasa-error .cercasa-error__card {
  padding: 2rem 1.5rem 1.75rem;
  border: 1px solid var(--cercasa-err-line, #e4e8e3);
  border-radius: 0;
  background: #fff;
}

body#pagenotfound .cercasa-error__code {
  margin: 0 0 0.35rem;
  font-size: clamp(3.5rem, 10vw, 5.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--cercasa-err-soft, #8a908a);
}

body#pagenotfound .cercasa-error__title,
.page-content--not-found.cercasa-error .cercasa-error__title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--cercasa-err-text, #1a1a1a);
}

body#pagenotfound .cercasa-error__text,
.page-content--not-found.cercasa-error .cercasa-error__text {
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--cercasa-err-muted, #5a605b);
}

body#pagenotfound .cercasa-error__text a,
.page-content--not-found.cercasa-error .cercasa-error__text a {
  color: #111;
  font-weight: 500;
  text-decoration: none;
}

body#pagenotfound .cercasa-error__text a:hover,
.page-content--not-found.cercasa-error .cercasa-error__text a:hover {
  color: #000;
}

/* Wyszukiwarka */
body#pagenotfound .cercasa-error__search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: stretch;
  max-width: 26rem;
  margin: 0 auto 1.35rem;
  text-align: left;
}

body#pagenotfound .cercasa-error__search-input {
  min-height: 2.75rem;
  border: 1px solid var(--cercasa-err-line);
  border-radius: 0;
  box-shadow: none;
  font-size: 0.9rem;
  color: var(--cercasa-err-text);
  background: #fff;
}

body#pagenotfound .cercasa-error__search-input:focus {
  border-color: #111;
  box-shadow: 0 0 0 1px #111;
}

body#pagenotfound .cercasa-error__search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
}

body#pagenotfound .cercasa-error__search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  color: #fff;
}

body#pagenotfound .cercasa-error__search-icon .cercasa-icon__svg {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
}

body#pagenotfound .cercasa-error__actions,
.page-content--not-found.cercasa-error .cercasa-error__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

body#pagenotfound .cercasa-error__btn,
.page-content--not-found.cercasa-error .cercasa-error__btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  line-height: 1;
  vertical-align: middle;
}

body#pagenotfound .cercasa-error__btn .material-icons,
.page-content--not-found.cercasa-error .cercasa-error__btn .material-icons {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  font-size: 1.15rem;
  line-height: 1;
}

body#pagenotfound .cercasa-error__btn span,
.page-content--not-found.cercasa-error .cercasa-error__btn span {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

/* Kategorie */
body#pagenotfound .cercasa-error__browse {
  margin-top: 1.5rem;
  text-align: center;
}

body#pagenotfound .cercasa-error__browse-title {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cercasa-err-soft);
}

body#pagenotfound .cercasa-error__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

body#pagenotfound .cercasa-error__cat {
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--cercasa-err-line);
  border-radius: 0;
  background: #fff;
  color: var(--cercasa-err-text);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

body#pagenotfound .cercasa-error__cat:hover,
body#pagenotfound .cercasa-error__cat:focus-visible {
  border-color: #111;
  background: var(--cercasa-err-bg-soft);
  color: #000;
}

body#pagenotfound .cercasa-error__hook:empty,
.page-content--not-found.cercasa-error .cercasa-error__hook:empty {
  display: none;
}

body#pagenotfound .cercasa-error__hook {
  margin-top: 1.5rem;
}

.cercasa-u-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 575.98px) {
  body#pagenotfound .cercasa-error__card,
  .page-content--not-found.cercasa-error .cercasa-error__card {
    padding: 1.5rem 1.15rem 1.35rem;
  }

  body#pagenotfound .cercasa-error__btn,
  .page-content--not-found.cercasa-error .cercasa-error__btn {
    width: 100%;
  }

  body#pagenotfound .cercasa-error__search {
    max-width: none;
  }
}
