/* Ładowany zawsze, ale aktywny wyłącznie po otwarciu strony z parametrem ?uwagi=1. */
.review-toolbar,
.review-panel,
.review-toast {
  display: none;
}

html.review-mode-active {
  scroll-padding-top: 88px;
}

html.review-mode-active body {
  padding-top: 56px;
}

html.review-mode-active .site-header {
  top: 56px;
}

html.review-mode-active .review-toolbar {
  position: fixed;
  z-index: 10020;
  inset: 0 0 auto;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem max(12px, calc((100vw - 1380px) / 2));
  background: #082f66;
  color: #fff;
  box-shadow: 0 8px 24px rgba(5, 35, 75, .2);
  font: 700 .88rem/1.2 "Nunito", sans-serif;
}

.review-toolbar strong {
  margin-right: auto;
  font-size: .98rem;
}

.review-toolbar button,
.review-panel button {
  border: 0;
  border-radius: 10px;
  padding: .68rem .85rem;
  background: #fff;
  color: #082f66;
  font: 800 .82rem/1 "Nunito", sans-serif;
  cursor: pointer;
}

.review-toolbar button:hover,
.review-panel button:hover {
  background: #ffdf68;
}

.review-toolbar .review-close {
  background: #ffedf3;
  color: #a2154d;
}

html.review-mode-active .review-hovered {
  outline: 3px dashed #ff2e7a !important;
  outline-offset: 4px;
  cursor: crosshair !important;
}

html.review-mode-active .review-selected {
  outline: 4px solid #05a4e4 !important;
  outline-offset: 5px;
}

.review-panel {
  position: fixed;
  z-index: 10030;
  top: 68px;
  right: 12px;
  width: min(380px, calc(100vw - 24px));
  max-height: calc(100vh - 80px);
  overflow: auto;
  padding: 1rem;
  border: 1px solid #cfe0ed;
  border-radius: 18px;
  background: #fff;
  color: #183b5c;
  box-shadow: 0 18px 55px rgba(5, 35, 75, .28);
  font-family: "Nunito", sans-serif;
}

.review-panel.open {
  display: block;
}

.review-panel h2,
.review-panel h3 {
  margin: 0 0 .65rem;
  color: #082f66;
  font-family: "Baloo 2", sans-serif;
}

.review-panel h2 { font-size: 1.45rem; }
.review-panel h3 { margin-top: 1rem; font-size: 1.1rem; }
.review-panel p { margin: .35rem 0; font-size: .86rem; line-height: 1.4; }
.review-panel code { padding: .2rem .4rem; border-radius: 6px; background: #edf7ff; color: #07598e; font-weight: 800; }
.review-panel .review-meta { padding: .7rem; border-radius: 10px; background: #f4f9fc; }
.review-panel label { display: block; margin-top: .85rem; color: #082f66; font-weight: 900; font-size: .86rem; }
.review-panel textarea {
  width: 100%;
  min-height: 130px;
  margin-top: .35rem;
  padding: .75rem;
  border: 2px solid #cfe0ed;
  border-radius: 12px;
  resize: vertical;
  color: #183b5c;
  font: 600 .9rem/1.45 "Nunito", sans-serif;
}
.review-panel textarea:focus { border-color: #05a4e4; outline: 0; }
.review-panel .review-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.review-panel .review-save { background: #05a4e4; color: #fff; }
.review-panel .review-delete { background: #ffedf3; color: #a2154d; }
.review-panel .review-status { min-height: 1.2em; color: #44708f; }
.review-panel .review-note-list { display: grid; gap: .5rem; margin: .5rem 0 0; padding: 0; list-style: none; }
.review-panel .review-note-list button { width: 100%; text-align: left; background: #f4f9fc; line-height: 1.3; }
.review-panel .review-note-list small { display: block; margin-top: .15rem; color: #54738b; font-weight: 600; }

.review-toast {
  position: fixed;
  z-index: 10040;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  padding: .8rem 1rem;
  border-radius: 12px;
  background: #082f66;
  color: #fff;
  box-shadow: 0 10px 30px rgba(5, 35, 75, .25);
  font: 800 .86rem/1.2 "Nunito", sans-serif;
}

.review-toast.visible { display: block; }

@media (max-width: 820px) {
  html.review-mode-active body { padding-top: 104px; }
  html.review-mode-active .site-header { top: 104px; }
  .review-toolbar { min-height: 104px; flex-wrap: wrap; }
  .review-toolbar strong { width: 100%; }
  .review-panel { top: 116px; max-height: calc(100vh - 128px); }
}
