/* V6.25 – soukromé oblíbené inzeráty. */
.favorite-button {
  cursor: pointer;
  transition: color .16s ease, background .16s ease, transform .16s ease, opacity .16s ease;
}

.favorite-button svg { pointer-events: none; }

.favorite-button.is-favorite {
  color: #0b0b0c;
  background: #ffe33d;
}

.favorite-button.is-favorite svg { fill: currentColor; }
.favorite-button.is-pending { opacity: .55; cursor: wait; }

.favorite-button:focus-visible,
.nap-favorites-launcher:focus-visible,
.nap-favorites-close:focus-visible,
.nap-favorite-remove:focus-visible,
.nap-favorite-open:focus-visible {
  outline: 3px solid #397ee8;
  outline-offset: 3px;
}

.category-card { position: relative; }

.category-card > .favorite-button {
  position: absolute;
  z-index: 3;
  top: .75rem;
  right: .75rem;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(11, 11, 12, .12);
  border-radius: 999px;
  color: #0b0b0c;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 5px 16px rgba(0, 0, 0, .12);
}

.category-card > .favorite-button.is-favorite { background: #ffe33d; }
.category-card > .favorite-button svg { width: 21px; height: 21px; }

.nap-detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .8rem;
}

.nap-detail-title-row h1 { flex: 1 1 auto; }

.nap-detail-title-row > .favorite-button {
  position: static;
  flex: 0 0 50px;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-top: .2rem;
  padding: 0;
  border: 2px solid #0b0b0c;
  border-radius: 999px;
  color: #0b0b0c;
  background: #fff;
}

.nap-detail-title-row > .favorite-button.is-favorite { background: #ffe33d; }

.nap-favorites-launcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .42rem;
  color: #0b0b0c;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.nap-favorites-launcher svg { width: 21px; height: 21px; }

.nap-favorites-icon-launcher svg,
.nap-favorites-detail-launcher svg { fill: none; }

.nap-favorites-page-launcher {
  min-height: 44px;
  padding: .7rem .85rem;
  border: 1px solid #d8d6cf;
  border-radius: 12px;
  background: #fff;
}

.nap-favorites-detail-launcher {
  width: 44px;
  padding: 0;
}

.nap-favorites-nav-launcher {
  padding: 0;
  border: 0;
  background: transparent;
  color: #545454;
  font-size: .88rem;
}

.nap-favorites-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #0b0b0c;
  background: #ffe33d;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.nap-favorites-nav-launcher .nap-favorites-badge,
.nap-favorites-page-launcher .nap-favorites-badge,
.nap-favorites-account-launcher .nap-favorites-badge { display: none; }

body.nap-favorites-open { overflow: hidden; }

.nap-favorites-layer[hidden] { display: none !important; }

.nap-favorites-layer {
  position: fixed;
  z-index: 12000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(11, 11, 12, .68);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.nap-favorites-dialog {
  width: min(720px, 100%);
  max-height: min(820px, calc(100vh - 2rem));
  max-height: min(820px, calc(100dvh - 2rem));
  overflow: auto;
  padding: 1.35rem;
  border-radius: 24px;
  color: #0b0b0c;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .28);
}

.nap-favorites-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.nap-favorites-kicker {
  color: #85720f;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .13em;
}

.nap-favorites-dialog h2 {
  margin: .3rem 0 0;
  font-size: clamp(1.7rem, 5vw, 2.35rem);
  line-height: 1.05;
}

.nap-favorites-close {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0 0 3px;
  border: 1px solid #d8d6cf;
  border-radius: 999px;
  color: #0b0b0c;
  background: #f2f1ed;
  font: 400 2rem/1 Arial, sans-serif;
  cursor: pointer;
}

.nap-favorites-note {
  margin: .9rem 0 1.15rem;
  padding: .8rem 1rem;
  border-radius: 12px;
  color: #454545;
  background: #fff9d5;
  font-size: .88rem;
  line-height: 1.45;
}

.nap-favorites-list { display: grid; gap: .75rem; }

.nap-favorite-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  padding: .65rem;
  border: 1px solid #d8d6cf;
  border-radius: 16px;
}

.nap-favorite-open {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: .85rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.nap-favorite-media {
  display: grid;
  place-items: center;
  width: 92px;
  height: 72px;
  overflow: hidden;
  border-radius: 11px;
  color: #8a760d;
  background: #f2f1ed;
}

.nap-favorite-media img { width: 100%; height: 100%; object-fit: cover; }
.nap-favorite-media svg { width: 28px; height: 28px; }
.nap-favorite-copy { display: grid; gap: .23rem; min-width: 0; }
.nap-favorite-copy strong { overflow-wrap: anywhere; font-size: .98rem; }
.nap-favorite-copy b { font-size: 1.05rem; }
.nap-favorite-copy small { color: #686868; }

.nap-favorite-reserved {
  justify-self: start;
  padding: .25rem .48rem;
  border-radius: 999px;
  color: #614900;
  background: #ffe45c;
  font-size: .64rem;
  font-weight: 950;
  letter-spacing: .055em;
  line-height: 1;
}

.nap-favorite-remove {
  min-height: 42px;
  padding: .65rem .8rem;
  border: 1px solid #c9a29e;
  border-radius: 11px;
  color: #a42c22;
  background: #fff;
  font: inherit;
  font-size: .82rem;
  font-weight: 850;
  cursor: pointer;
}

.nap-favorite-remove:disabled { opacity: .5; cursor: wait; }

.nap-favorites-empty {
  display: grid;
  justify-items: center;
  gap: .55rem;
  padding: 2.6rem 1rem;
  color: #686868;
  text-align: center;
}

.nap-favorites-empty[hidden] { display: none; }
.nap-favorites-empty svg { width: 42px; height: 42px; color: #8a760d; }
.nap-favorites-empty strong { color: #0b0b0c; font-size: 1.15rem; }

.nap-favorites-toast {
  position: fixed;
  z-index: 13000;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  width: min(520px, calc(100% - 2rem));
  padding: .85rem 1rem;
  border-radius: 13px;
  color: #ffe33d;
  background: #0b0b0c;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .25);
  font-size: .9rem;
  font-weight: 800;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: opacity .2s ease, transform .2s ease;
}

.nap-favorites-toast[data-kind="error"] { color: #fff; background: #a42c22; }
.nap-favorites-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (hover: hover) {
  .favorite-button:hover { transform: scale(1.06); }
  .nap-favorite-open:hover strong { text-decoration: underline; }
}

@media (max-width: 720px) {
  .main-nav .nap-favorites-nav-launcher {
    justify-content: flex-start;
    width: 100%;
    padding: .85rem;
    border-radius: .7rem;
    color: #545454;
  }
}

@media (max-width: 540px) {
  .nap-favorites-layer { align-items: end; padding: .4rem; }
  .nap-favorites-dialog {
    max-height: calc(100vh - .8rem);
    max-height: calc(100dvh - .8rem);
    padding: 1rem;
    border-radius: 22px;
  }
  .nap-favorite-row { grid-template-columns: 1fr; }
  .nap-favorite-open { grid-template-columns: 76px minmax(0, 1fr); }
  .nap-favorite-media { width: 76px; height: 66px; }
  .nap-favorite-remove { width: 100%; }
  .category-header .nap-favorites-page-launcher > span { display: none; }
  .category-header .nap-favorites-page-launcher { width: 42px; padding: 0; }
  .nap-detail-title-row > .favorite-button { flex-basis: 46px; width: 46px; height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .favorite-button,
  .nap-favorites-toast { transition: none; }
}
