/* ——— Seznam anket (feed grid jako příspěvky) ——— */

.poll-list-toolbar {
  margin-bottom: var(--space-3);
  padding: var(--space-3) var(--space-4);
}

.poll-list-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}

.poll-list-title {
  margin: 0;
  font-size: 1.25rem;
}

.poll-list-hint {
  margin: 0;
  font-size: 0.8125rem;
}

.feed-grid > .poll-card {
  position: relative;
  margin-bottom: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}

.feed-grid > .poll-card:hover,
.feed-grid > .poll-card:focus-within {
  box-shadow: var(--shadow-md);
}

.feed-grid > .poll-card:hover .post-title,
.feed-grid > .poll-card:focus-within .post-title {
  text-decoration: underline;
}

.poll-card-stretch-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.poll-card-stretch-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.poll-card-header {
  position: relative;
  z-index: 0;
}

.poll-card-question,
.poll-card-excerpt,
.poll-card-footer {
  position: relative;
  z-index: 0;
}

.feed-grid .poll-card-author {
  font-size: 0.8rem;
}

.feed-grid .poll-card-author .post-author,
.feed-grid .poll-card-header .post-author {
  width: 100%;
  flex-basis: 100%;
}

.poll-status-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  line-height: 1.3;
}

.poll-status-open {
  background: #dcfce7;
  color: #166534;
}

.poll-status-closed {
  background: #f3f4f6;
  color: #4b5563;
}

.poll-detail-cover {
  width: auto;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: var(--radius-sm);
}

.poll-detail-cover-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--post-detail-cover-h, 22.5rem);
  max-height: var(--post-detail-cover-h, 22.5rem);
  margin-bottom: var(--space-3);
  background: rgb(15 23 42 / 4%);
  border-radius: var(--radius-sm);
}

.poll-card-has-cover .poll-card-cover {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--post-feed-cover-h, 10rem);
  min-height: var(--post-feed-cover-h, 10rem);
  max-height: var(--post-feed-cover-h, 10rem);
  margin: calc(-1 * var(--space-4)) calc(-1 * var(--space-4)) var(--space-3);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  background: rgb(15 23 42 / 4%);
}

.poll-card-has-cover .poll-card-cover .post-cover-img {
  width: auto;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.poll-photo-hint {
  margin: -0.15rem 0 var(--space-2);
  font-size: 0.8125rem;
}

/* ——— Detail ankety ——— */

.poll-detail.panel {
  padding: var(--space-3) var(--space-4);
}

.poll-detail-header {
  margin-bottom: var(--space-2);
}

.poll-detail-meta {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.poll-detail-question {
  margin: 0 0 var(--space-2);
  font-size: 1.15rem;
  line-height: 1.35;
}

.poll-description {
  margin: 0 0 var(--space-3);
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.poll-vote-block {
  margin-bottom: var(--space-2);
}

.poll-guest-signup {
  margin: var(--space-3) 0;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-surface) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
}

.poll-guest-signup-title {
  margin: 0 0 var(--space-2);
  font-size: 1rem;
}

.poll-guest-signup-lead {
  margin: 0 0 var(--space-2);
}

.poll-guest-signup .form-error {
  margin-bottom: var(--space-2);
}

.poll-guest-signup label {
  display: block;
  margin-bottom: var(--space-2);
}

.poll-guest-login-link {
  margin: var(--space-2) 0 0;
}

.poll-guest-free-note {
  margin: var(--space-2) 0 0;
  font-size: 0.875rem;
}

.poll-guest-verify-flash {
  margin-bottom: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
}

.poll-guest-verify-flash-lead {
  margin: 0 0 var(--space-2);
  font-size: 1rem;
}

.poll-guest-verify-flash-detail {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
}

.poll-vote-submit {
  margin-top: var(--space-2);
}

.poll-options-fieldset {
  border: none;
  margin: 0 0 var(--space-2);
  padding: 0;
}

.poll-option-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding: 0.15rem 0;
  cursor: pointer;
  font-size: 0.875rem;
}

.poll-other-text {
  flex: 1 1 100%;
  margin-left: 1.25rem;
  font-size: 0.875rem;
}

.poll-voted-msg,
.poll-login-hint {
  margin: 0 0 var(--space-2);
  font-size: 0.875rem;
}

.poll-voted-msg {
  padding: var(--space-2);
  background: #eff6ff;
  border-radius: var(--radius-sm);
}

.poll-results {
  margin-top: var(--space-2);
}

.poll-result-row {
  margin-bottom: var(--space-2);
}

.poll-result-label {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: 0.8125rem;
  margin-bottom: 0.15rem;
}

.poll-result-stats {
  color: var(--color-text-muted);
  white-space: nowrap;
  font-size: 0.75rem;
}

.poll-result-bar-track {
  height: 0.35rem;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

.poll-result-bar-fill {
  height: 100%;
  background: #1e5a8a;
  border-radius: 3px;
  min-width: 0;
  transition: width 0.3s ease;
}

.poll-result-total {
  margin: var(--space-2) 0 0;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.poll-actions-top {
  margin-top: var(--space-2);
}

.poll-detail-actions {
  margin-top: 0;
}

.poll-detail-actions .post-actions-main {
  flex: 1;
}

.comments-section .comments-heading {
  margin: 0 0 var(--space-3);
  font-size: 1rem;
}

.poll-other-section {
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: #f9fafb;
  border-radius: var(--radius-sm);
}

.poll-section-title {
  font-size: 0.875rem;
  margin: 0 0 var(--space-1);
  font-weight: 600;
}

.poll-other-hint {
  margin: 0 0 var(--space-2);
  font-size: 0.75rem;
}

.poll-other-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.8125rem;
}

.poll-other-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.poll-other-list li:last-child {
  border-bottom: none;
}

.poll-other-time {
  display: block;
  font-size: 0.6875rem;
  color: #9ca3af;
}

/* ——— Formulář nové ankety ——— */

.poll-option-input-row {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.poll-option-input-row input {
  flex: 1;
}

.poll-allow-other {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  margin: var(--space-3) 0;
}

.poll-voting-mode-fieldset {
  margin: var(--space-4) 0;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.poll-voting-mode-option {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  margin: 0 0 var(--space-2);
  cursor: pointer;
}

.poll-max-choices-wrap {
  margin-top: var(--space-2);
  padding-left: 1.5rem;
}

.poll-max-choices-wrap select {
  max-width: 12rem;
}

.poll-vote-hint {
  margin-bottom: var(--space-2);
}
