/* Commentaar-UI voor Stayd-pitch.
   Alle wrappers krijgen .stayd-ui zodat ze door de selectie-detectie
   herkenbaar zijn als blokkerend element. */

.stayd-ui, .stayd-ui * { box-sizing: border-box; }

body.stayd-no-scroll { overflow: hidden; }

/* ----- Top-hint-strip ----- */

.stayd-hint-strip {
  background: #FFF6E0;
  border-bottom: 1px solid #E7D9A8;
  color: #5A4A18;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  position: relative;
  z-index: 50;
}

.stayd-hint-strip span { max-width: 60ch; line-height: 1.4; }

.stayd-hint-close {
  background: transparent;
  border: none;
  color: #5A4A18;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 0.3rem;
  line-height: 1;
}

.stayd-hint-close:hover { color: #000; }

/* ----- Zwevende pil rechtsonder ----- */

.stayd-pill {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  background: #E5EEF1;
  color: #1F4E5F;
  border: 1px solid #1F4E5F;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  z-index: 100;
  transition: background 0.15s ease, transform 0.15s ease;
}

.stayd-pill:hover { background: #D5E4E9; transform: translateY(-1px); }

.stayd-pill-icon {
  display: inline-flex;
  align-items: center;
  color: #3A6F7C;
}

.stayd-pill.has-comments {
  background: #C97B3D;
  color: #FFF;
  border-color: #A55E2A;
  animation: stayd-pulse 1.4s ease-in-out 2;
}

.stayd-pill.has-comments:hover { background: #B86A2E; }

.stayd-pill-count {
  background: rgba(255,255,255,0.25);
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
  font-weight: 700;
  min-width: 1.4rem;
  text-align: center;
}

@keyframes stayd-pulse {
  0%   { box-shadow: 0 2px 8px rgba(0,0,0,0.12), 0 0 0 0 rgba(201,123,61,0.55); }
  70%  { box-shadow: 0 2px 8px rgba(0,0,0,0.12), 0 0 0 12px rgba(201,123,61,0); }
  100% { box-shadow: 0 2px 8px rgba(0,0,0,0.12), 0 0 0 0 rgba(201,123,61,0); }
}

/* ----- Selectie-knop ----- */

.stayd-sel-btn {
  position: absolute;
  display: none;
  background: #1F4E5F;
  color: #FFF;
  border: none;
  border-radius: 3px;
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  z-index: 90;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

.stayd-sel-btn:hover { background: #2A6275; }

/* ----- Highlight in tekst ----- */

.stayd-highlight {
  background: #FFF1A8;
  padding: 0 0.05em;
  border-radius: 2px;
  color: inherit;
}

/* ----- Zij-paneel ----- */

.stayd-panel {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}

.stayd-panel-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.2s ease;
  pointer-events: none;
  cursor: pointer;
}

.stayd-panel.open { pointer-events: auto; }
.stayd-panel.open .stayd-panel-overlay {
  background: rgba(0,0,0,0.18);
  pointer-events: auto;
}

.stayd-panel-inner {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: min(440px, calc(100vw - 56px));
  background: #FAFAF8;
  box-shadow: -2px 0 10px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(110%);
  transition: transform 0.25s ease;
}

.stayd-panel.open .stayd-panel-inner { transform: translateX(0); }

.stayd-panel-tab {
  position: absolute;
  left: -36px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 64px;
  background: #1F4E5F;
  color: #FFF;
  border: none;
  border-radius: 6px 0 0 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: -2px 2px 8px rgba(0,0,0,0.18);
}

.stayd-panel-tab:hover { background: #2A6275; }

.stayd-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid #D5D5D0;
  background: #FFF;
}

.stayd-panel-header h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #1F4E5F;
  border: none;
  padding: 0;
}

.stayd-panel-close {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #555;
  padding: 0.2rem 0.5rem;
  line-height: 1;
}

.stayd-panel-close:hover { color: #000; }

.stayd-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.2rem;
}

.stayd-empty {
  color: #555;
  font-size: 0.95rem;
  margin: 0 0 0.6rem;
}

.stayd-empty-tip { color: #777; font-size: 0.85rem; margin: 0; }

.stayd-group { margin-bottom: 1.4rem; }

.stayd-group h3 {
  font-size: 0.92rem;
  color: #1F4E5F;
  margin: 0 0 0.5rem;
  font-weight: 700;
  border: none;
  padding: 0;
}

.stayd-pg-link, .stayd-pg-cur {
  font-weight: 400;
  color: #777;
  font-size: 0.82rem;
  margin-left: 0.4rem;
}

.stayd-pg-link { color: #3A6F7C; border-bottom: 1px dotted #3A6F7C; }

.stayd-cmt {
  background: #FFF;
  border: 1px solid #E0E0DA;
  border-radius: 3px;
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.6rem;
}

.stayd-cmt blockquote {
  margin: 0 0 0.5rem;
  padding: 0.4rem 0.7rem;
  background: #F4EFE4;
  border-left: 2px solid #C97B3D;
  font-size: 0.85rem;
  color: #444;
  font-style: italic;
  line-height: 1.4;
  border-radius: 2px;
}

.stayd-cmt-text {
  width: 100%;
  min-height: 70px;
  padding: 0.5rem 0.6rem;
  border: 1px solid #D5D5D0;
  border-radius: 3px;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  color: #1A1A1A;
  background: #FFF;
}

.stayd-cmt-text:focus {
  outline: none;
  border-color: #1F4E5F;
  box-shadow: 0 0 0 2px rgba(31,78,95,0.15);
}

.stayd-cmt-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  gap: 0.5rem;
}

.stayd-cmt-delete {
  background: transparent;
  border: none;
  color: #C2533D;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
  padding: 0.35rem 0.4rem;
}

.stayd-cmt-delete:hover { text-decoration: underline; }

.stayd-cmt-save {
  background: #1F4E5F;
  color: #FFF;
  border: none;
  border-radius: 3px;
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}

.stayd-cmt-save:hover { background: #2A6275; }

.stayd-panel-footer {
  border-top: 1px solid #D5D5D0;
  background: #FFF;
  padding: 0.9rem 1.2rem 1.1rem;
}

.stayd-send-stage1 {
  width: 100%;
  background: #C97B3D;
  color: #FFF;
  border: none;
  border-radius: 3px;
  padding: 0.7rem 1rem;
  font-size: 0.92rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}

.stayd-send-stage1:hover { background: #B86A2E; }

.stayd-stage1-note {
  font-size: 0.78rem;
  color: #777;
  margin: 0.6rem 0 0;
  line-height: 1.4;
}

.stayd-back {
  background: transparent;
  border: none;
  color: #3A6F7C;
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0 0 0.4rem;
  margin-bottom: 0.3rem;
}

.stayd-back:hover { text-decoration: underline; }

.stayd-field {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
  color: #444;
}

.stayd-field span { display: block; margin-bottom: 0.25rem; }
.stayd-field em { color: #777; font-style: italic; font-weight: 400; }

.stayd-field input {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid #D5D5D0;
  border-radius: 3px;
  font-family: inherit;
  font-size: 0.9rem;
}

.stayd-field input:focus {
  outline: none;
  border-color: #1F4E5F;
  box-shadow: 0 0 0 2px rgba(31,78,95,0.15);
}

.stayd-send {
  width: 100%;
  background: #1F4E5F;
  color: #FFF;
  border: none;
  border-radius: 3px;
  padding: 0.65rem 1rem;
  font-size: 0.92rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.4rem;
}

.stayd-send:hover:not(:disabled) { background: #2A6275; }
.stayd-send:disabled { opacity: 0.6; cursor: wait; }

.stayd-privacy-note {
  font-size: 0.78rem;
  color: #777;
  margin: 0.7rem 0 0;
  line-height: 1.4;
}

.stayd-thanks {
  text-align: center;
  padding: 2rem 1rem;
  color: #1F4E5F;
}

.stayd-thanks p { margin: 0.6rem 0; }

.stayd-thanks button {
  background: #1F4E5F;
  color: #FFF;
  border: none;
  border-radius: 3px;
  padding: 0.5rem 1rem;
  font-family: inherit;
  cursor: pointer;
  margin-top: 0.6rem;
}

/* ----- Print ----- */

@media print {
  .stayd-ui { display: none !important; }
}

/* ----- Smal scherm ----- */

@media (max-width: 480px) {
  .stayd-pill {
    bottom: 0.8rem;
    right: 0.8rem;
    font-size: 0.82rem;
    padding: 0.5rem 0.85rem;
  }
  .stayd-hint-strip { font-size: 0.82rem; padding: 0.5rem 0.7rem; }
  .stayd-panel-inner { max-width: calc(100vw - 48px); }
  .stayd-panel-tab { left: -32px; width: 32px; height: 56px; }
}
