/* Hjärtat ligger över själva bilden, inte över figurtexten. */
.nyan-bildrost-imagewrap { position: relative; display: inline-block; vertical-align: top; max-width: 100%; }
.nyan-bildrost-imagewrap > img { display: block; max-width: 100%; height: auto; }
.nyan-bildrost-heart {
  position: absolute; right: 13px; bottom: 53px; z-index: 5;
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 42px; padding: 6px 13px; border: 1px solid rgba(255,255,255,.45);
  border-radius: 25px; background: rgba(0,0,0,.43); color: #fff;
  font-size: 14px; font-weight: 600; line-height: 1.2; font-family: inherit; text-transform: none;
  box-shadow: 0 2px 10px rgba(0,0,0,.14); cursor: pointer;
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  transition: background .15s, transform .15s;
}
.nyan-bildrost-heart:hover, .nyan-bildrost-heart:focus-visible { background: rgba(0,0,0,.68); transform: scale(1.035); color: #fff; }
.nyan-bildrost-heart svg { flex: none; }
.nyan-bildrost-heart:hover svg path, .nyan-bildrost-heart.nyan-bildrost-voted svg path { fill: rgba(230,60,105,.85); }
.nyan-bildrost-heart:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Formulär. Allt är scoped för att inte påverka sajtens befintliga modaler. */
html.nyan-bildrost-modal-open { overflow: hidden; }
.nyan-bildrost-backdrop[hidden], .nyan-bildrost-preview[hidden], .nyan-bildrost-message[hidden], #nyan-bildrost-form[hidden] { display: none !important; }
.nyan-bildrost-backdrop {
  position: fixed; z-index: 2147483000; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.7); padding: 16px; overflow-y: auto;
}
.nyan-bildrost-dialog {
  box-sizing: border-box; position: relative; width: min(100%, 460px); max-height: calc(100dvh - 32px);
  padding: 25px; border-radius: 12px; overflow: auto; background: #fff; color: #222;
  font-family: inherit; box-shadow: 0 15px 55px rgba(0,0,0,.25); text-align: left;
}
.nyan-bildrost-dialog *, .nyan-bildrost-dialog *:before, .nyan-bildrost-dialog *:after { box-sizing: border-box; }
.nyan-bildrost-dialog h2 { font-size: 24px; font-weight: 700; line-height: 1.2; font-family: inherit; margin: 0 35px 8px 0; color: inherit; }
.nyan-bildrost-dialog .nyan-bildrost-intro { margin: 0 0 15px; font-size: 14px; line-height: 1.5; }
.nyan-bildrost-close {
  position: absolute; top: 14px; right: 15px;
  display: flex; align-items: center; justify-content: center;
  box-sizing: border-box; width: 38px; height: 38px;
  min-width: 38px; min-height: 38px; max-width: 38px; max-height: 38px;
  padding: 0; margin: 0;
  border: 2px solid currentColor; border-radius: 50% !important;
  background: transparent; color: inherit; box-shadow: none;
  font-family: Arial, sans-serif; font-size: 26px; font-weight: 400; line-height: 1;
  text-align: center; cursor: pointer; appearance: none; -webkit-appearance: none;
}
.nyan-bildrost-close:hover { background: rgba(127,127,127,.12); }
.nyan-bildrost-close:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.nyan-bildrost-preview { text-align: center; margin: 0 0 16px; }
.nyan-bildrost-preview img { display: inline-block; max-width: 100%; max-height: 155px; height: auto; width: auto; border-radius: 5px; }
#nyan-bildrost-form > label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 12px; }
#nyan-bildrost-form > label:not(.nyan-bildrost-marketing) > input {
  display: block; width: 100%; height: 43px; padding: 10px 12px; margin-top: 5px;
  border-radius: 5px; border: 1px solid #a4a4a4; background: #fff; color: #222;
  font-size: 16px; font-weight: 400; line-height: 1.3; font-family: inherit;
}
#nyan-bildrost-form > label:not(.nyan-bildrost-marketing) > input:focus { outline: 2px solid #177a9e; outline-offset: 0; }
/* Obligatoriskt aktivt samtycke till e-postmarknadsföring. */
#nyan-bildrost-form > label.nyan-bildrost-marketing {
  display: flex; align-items: flex-start; gap: 9px;
  margin: 0 0 16px; font-size: 13px; font-weight: 400; line-height: 1.45;
  cursor: pointer;
}
#nyan-bildrost-form > label.nyan-bildrost-marketing > input[type="checkbox"] {
  display: block; flex: 0 0 18px;
  box-sizing: border-box; width: 18px; height: 18px; margin: 1px 0 0; padding: 0;
  appearance: auto; -webkit-appearance: checkbox; accent-color: #c52a30; cursor: pointer;
}
.nyan-bildrost-marketing span { flex: 1; }
.nyan-bildrost-privacy { font-size: 12px; line-height: 1.5; opacity: .84; margin: 0 0 13px; }
.nyan-bildrost-submit { width: 100%; padding: 12px 20px; border: 0; border-radius: 5px; background: #c52a30; color: #fff; font-size: 15px; font-weight: 700; line-height: 1.3; font-family: inherit; cursor: pointer; }
.nyan-bildrost-submit:hover { background: #a7272c; }
.nyan-bildrost-submit:disabled { opacity: .65; cursor: default; }
.nyan-bildrost-message { padding: 10px 12px; margin: 0 0 12px; border-radius: 5px; background: #fff1f1; border: 1px solid #c54c4c; font-size: 14px; }
.nyan-bildrost-message.is-success { background: #edf8f0; border-color: #4d9c60; }
.nyan-bildrost-hp { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.nyan-bildrost-toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 2147483000; max-width: calc(100vw - 30px); background: #1d6f3c; color: #fff; padding: 14px 20px; border-radius: 8px; font-size: 15px; font-weight: 600; line-height: 1.4; font-family: inherit; box-shadow: 0 7px 30px rgba(0,0,0,.2); }
html[data-theme="dark"] .nyan-bildrost-dialog { background: #24272b; color: #f2f2f2; }
html[data-theme="dark"] #nyan-bildrost-form > label:not(.nyan-bildrost-marketing) > input { background: #32363b; color: #fff; border-color: #646a73; }
html[data-theme="dark"] .nyan-bildrost-message { background: #3e2828; }
html[data-theme="dark"] .nyan-bildrost-message.is-success { background: #243d2e; }
@media (max-width: 500px) {
  .nyan-bildrost-heart { right: 8px; top: 8px; bottom: auto; min-height: 39px; padding: 5px 10px; }
  .nyan-bildrost-heart svg { width: 24px; height: 24px; }
  .nyan-bildrost-dialog { padding: 20px; }
}
