/* ── Base ── */
.dotaznik-embed {
  margin-top: 2rem;
  background: #fff;
  border-radius: 25px;
}

.dotaznik-embed * {
  box-sizing: border-box;
}

/* ── Intro ── */
.dotaznik-embed .dq-intro {
  background-color: #f0f0f0;
  padding: 2rem;
  border-radius: 16px;
}

/* ── Form ── */
.dotaznik-embed form {
  margin-top: 2rem;
}

/* ── Questions ── */
.dotaznik-embed .dq-question {
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 16px;
  background: rgba(0, 0, 0, .02);
  padding: 14px;
  margin-bottom: 12px;
}

.dotaznik-embed .dq-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
  margin-top: 1rem;;
}

/* ── Radio inline options (pill labels) ── */
.dotaznik-embed .dq-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.dotaznik-embed .dq-options label {
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, .12);
  background: #fff;
  font-size: 0.9em;
  margin-bottom: 0;
}

.dotaznik-embed .dq-options label:has(input:checked) {
  background-color: rgba(160, 20, 65, 0.1);
  border-color: rgba(160, 20, 65, 0.1);
}

/* ── Radio card options (full-width block labels) ── */
.dotaznik-embed .dq-option {
  display: block;
  margin: 10px 0;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
}

.dotaznik-embed .dq-option:last-child {
  margin-bottom: 0;
}

.dotaznik-embed .dq-option:has(input[type="radio"]:checked) {
  background: rgba(160, 20, 65, 0.1);
}

.dotaznik-embed .dq-option:hover {
  border-color: #a01441;
  background: rgba(160, 20, 65, 0.1);
}

.dotaznik-embed .dq-option input[type="radio"] {
  margin-right: 10px;
  transform: translateY(1px);
}

/* ── Checklist ── */
.dotaznik-embed .dq-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.dotaznik-embed .dq-checklist-item {
  border: 1px solid rgba(0, 0, 0, .10);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, .02);
}

.dotaznik-embed .dq-checklist-item:has(input:checked) {
  background: rgba(160, 20, 65, 0.1);
}

.dotaznik-embed .dq-checklist-item label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 0;
}

.dotaznik-embed .dq-checklist-item input {
  margin-top: 3px;
  accent-color: #111;
}

/* ── Progress bar (for radio-card type) ── */
.dotaznik-embed .dq-sticky-top {
  position: sticky;
  top: 65px;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 14px;
  padding: 14px;
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .dotaznik-embed .dq-sticky-top {
    top: 115px;
  }
}

.dotaznik-embed .dq-options input[type="radio"] {
  accent-color: #a01441; 
}

.dotaznik-embed .dq-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 14px;
  color: #334155;
  font-weight: 700;
}

.dotaznik-embed .dq-progress {
  width: 100%;
  height: 12px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.dotaznik-embed .dq-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(160, 20, 65, 0.1) 0%, #a01441 100%);
  border-radius: 999px;
  transition: width 0.25s ease;
}

/* ── Actions ── */
.dotaznik-embed .dq-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

/* ── Button overrides for dotaznik context ── */
.dotaznik-embed .button-secondary {
  color: black !important;
  background: #f0f0f0 !important;
}

.dotaznik-embed .button-secondary:hover {
  background-color: #aaa !important;
  color: white !important;
}

/* ── Error ── */
.dotaznik-embed .dq-error {
  display: none;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  font-weight: 700;
}

/* ── Result ── */
.dotaznik-embed .dq-result {
  display: none;
  margin-top: 20px;
  border-radius: 16px;
  padding: 20px;
  border: 1px dashed rgba(0, 0, 0, .22);
  background: rgba(0, 0, 0, .02);
}

.dotaznik-embed .dq-result h3 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.2;
}

.dotaznik-embed .dq-result-score {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.dotaznik-embed .dq-result-level {
  display: inline-block;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.dotaznik-embed .dq-result-text {
  font-size: 16px;
  color: #334155;
}

.dotaznik-embed .dq-result-note {
  margin-top: 14px;
  font-size: 14px;
  color: #64748b;
}

/* Result severity levels */
.dotaznik-embed .dq-result.low {
  background: #fef2f2;
  border-color: #fecaca;
}
.dotaznik-embed .dq-result.low .dq-result-level {
  background: #fee2e2;
  color: #991b1b;
}

.dotaznik-embed .dq-result.mid {
  background: #fffbeb;
  border-color: #fde68a;
}
.dotaznik-embed .dq-result.mid .dq-result-level {
  background: #fef3c7;
  color: #92400e;
}

.dotaznik-embed .dq-result.high {
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.dotaznik-embed .dq-result.high .dq-result-level {
  background: #d1fae5;
  color: #065f46;
}

/* ── Range slider ── */
.dotaznik-embed input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  background: #e0e0e0;
}
.dotaznik-embed input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: transparent;
}
.dotaznik-embed input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: #e0e0e0;
}
.dotaznik-embed input[type="range"]::-moz-range-progress {
  height: 6px;
  border-radius: 3px;
  background: #a01441;
}
.dotaznik-embed input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #a01441;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  margin-top: -6px;
  cursor: pointer;
}
.dotaznik-embed input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #a01441;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

/* Slider UX enhancement (added by PHP) */
.dq-slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dq-slider-wrap input[type="range"] {
  width: 100%;
}
.dq-slider-ticks {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
  font-size: 11px;
  color: #999;
}
.dq-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #666;
}
.dq-slider-value {
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  color: #333;
  min-height: 1.4em;
}

/* ── Blog context overrides ── */
section.blog-post .blog-content .clanok .dotaznik-embed h2 {
  margin-top: 10px;
}
section.blog-post .blog-content .clanok .dotaznik-embed h3 {
  margin-top: 0;
}
section.blog-post .blog-content .clanok .dotaznik-embed .dq-intro p:last-child,
section.blog-post .blog-content .clanok .dotaznik-embed .dq-result p:last-child,
section.blog-post .blog-content .clanok .dotaznik-embed .dq-question p:last-child {
  margin-bottom: 0;
}

/* ── Responsive ── */
@media screen and (max-width: 768px) {
  .dotaznik-embed .dq-options {
    display: grid;
    gap: 12px;
  }

  .dotaznik-embed .dq-question h3 {
    font-size: 17px;
  }

  .dotaznik-embed .dq-question {
    padding: 12px;
  }
}
