/* Naša Bytča – Spomienky a odkazy k osobnostiam */

.nby-story-entry {
  margin-top: 16px;
}

.nby-story-open {
  width: 100%;
  border: 1px solid rgba(251, 96, 0, 0.28);
  background: rgba(251, 96, 0, 0.06);
  border-radius: 14px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #1f2937;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.nby-story-open:hover {
  transform: translateY(-1px);
  border-color: rgba(251, 96, 0, 0.55);
  background: rgba(251, 96, 0, 0.10);
}

.nby-story-open-main {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.nby-story-open-main i {
  color: #fb6000;
  font-size: 1.1rem;
}

.nby-story-count {
  min-width: 30px;
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #fb6000;
  font-size: .85rem;
  border: 1px solid rgba(251, 96, 0, .22);
}

.nby-story-modal[hidden] {
  display: none !important;
}

.nby-story-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 18px;
}

.nby-story-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, .58);
  backdrop-filter: blur(2px);
}

.nby-story-dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: min(88vh, 860px);
  overflow: auto;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .23);
}

.nby-story-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  padding: 20px 58px 16px 20px;
  border-bottom: 1px solid rgba(31, 41, 55, .10);
}

.nby-story-head small {
  color: #fb6000;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.nby-story-head h3 {
  margin: 4px 0 0;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  color: #1f2937;
}

.nby-story-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #f3f4f6;
  color: #1f2937;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.2rem;
}

.nby-story-body {
  padding: 20px;
}

.nby-story-intro {
  margin: 0 0 16px;
  color: #4b5563;
  line-height: 1.6;
}

.nby-story-list {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.nby-story-card {
  border: 1px solid rgba(31, 41, 55, .10);
  border-radius: 15px;
  padding: 14px 15px;
  background: #fafafa;
}

.nby-story-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.nby-story-kind {
  color: #fb6000;
  font-size: .82rem;
  font-weight: 800;
}

.nby-story-date {
  color: #9ca3af;
  font-size: .78rem;
}

.nby-story-card p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #374151;
  line-height: 1.6;
}

.nby-story-author {
  margin-top: 9px;
  color: #6b7280;
  font-size: .86rem;
  font-weight: 600;
}

.nby-story-empty,
.nby-story-loading {
  border: 1px dashed rgba(31, 41, 55, .18);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  color: #6b7280;
  background: #fafafa;
}

.nby-story-form-wrap {
  border-top: 1px solid rgba(31, 41, 55, .10);
  padding-top: 18px;
}

.nby-story-form-wrap h4 {
  margin: 0 0 6px;
  color: #1f2937;
  font-size: 1.05rem;
}

.nby-story-form-help {
  margin: 0 0 14px;
  color: #6b7280;
  font-size: .9rem;
}

.nby-story-field {
  margin-bottom: 13px;
}

.nby-story-field label {
  display: block;
  margin-bottom: 6px;
  color: #374151;
  font-size: .88rem;
  font-weight: 700;
}

.nby-story-field input,
.nby-story-field select,
.nby-story-field textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  color: #1f2937;
  background: #fff;
}

.nby-story-field textarea {
  min-height: 120px;
  resize: vertical;
}

.nby-story-field input:focus,
.nby-story-field select:focus,
.nby-story-field textarea:focus {
  outline: 3px solid rgba(251, 96, 0, .12);
  border-color: #fb6000;
}

.nby-story-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: -8px;
  margin-bottom: 10px;
  color: #9ca3af;
  font-size: .78rem;
}

.nby-story-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 14px 0;
  color: #4b5563;
  font-size: .84rem;
  line-height: 1.45;
}

.nby-story-consent input {
  margin-top: 3px;
}

.nby-story-submit {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 11px 14px;
  background: #fb6000;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.nby-story-submit:disabled {
  opacity: .6;
  cursor: wait;
}

.nby-story-status {
  margin-top: 11px;
  font-size: .88rem;
  font-weight: 600;
}

.nby-story-status.is-success {
  color: #15803d;
}

.nby-story-status.is-error {
  color: #b91c1c;
}

body.nby-story-lock {
  overflow: hidden;
}

@media (max-width: 575.98px) {
  .nby-story-modal {
    padding: 8px;
    align-items: end;
  }

  .nby-story-dialog {
    width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 10px 10px;
  }

  .nby-story-head,
  .nby-story-body {
    padding-left: 16px;
    padding-right: 16px;
  }
}
