/* Голос дня — FAB после «М», страница данных, модалка */

.site-vod-root {
  position: fixed;
  z-index: 10960;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.site-vod-root .site-vod-stack {
  pointer-events: auto;
}

.site-vod-stack {
  position: fixed;
  z-index: 10961;
  right: max(10px, env(safe-area-inset-right, 0px) + 10px);
  top: calc(
    var(--site-header-sticky-offset, 96px) + 52px +
      (var(--site-fab-above-vod, 0) * 48px)
  );
  width: 44px;
}

@media (min-width: 1080px) {
  .site-vod-stack {
    top: calc(
      var(--site-header-sticky-offset, 96px) + 10px +
        (var(--site-fab-above-vod, 0) * 48px)
    );
    right: max(16px, env(safe-area-inset-right, 0px) + 16px);
  }
}

.site-vod-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--border, #111);
  border-radius: 10px;
  background: var(--card, #fff);
  color: var(--foreground, #111);
  box-shadow: 3px 3px 0 0 var(--border, #111);
  text-decoration: none;
  font-weight: 800;
}

.site-vod-fab:hover,
.site-vod-fab:focus-visible {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 0 var(--border, #111);
}

.site-vod-fab-glyph {
  font-size: 16px;
  line-height: 1;
}

.vote-prompt-modal.vod-modal {
  align-items: flex-start;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px;
}

.vod-dialog.vote-prompt-dialog,
.vod-dialog {
  width: min(calc(100vw - 24px), 520px);
  max-width: calc(100vw - 24px);
  max-height: min(calc(100dvh - 32px), 92vh);
  box-sizing: border-box;
  margin: auto 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.vod-modal-when {
  margin: 0 0 10px;
  font-size: 13px;
  opacity: 0.8;
}

.vod-modal-cover-wrap {
  margin: 0 0 12px;
  text-align: center;
}

.vod-modal-cover-wrap img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(45vh, 360px);
  margin: 0 auto;
  object-fit: contain;
  border: 2px solid var(--border, #111);
  border-radius: 8px;
}

.vod-modal-news {
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 2px solid var(--border, #111);
  border-radius: 10px;
  background: var(--input, #f5f5f5);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  white-space: pre-wrap;
}

.vod-modal-news[hidden],
.vod-modal-desc[hidden] {
  display: none !important;
}

.vod-modal-desc {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.4;
}

.vod-vote-row {
  margin: 14px 0 0;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.vod-vote-row .card-action,
.vod-vote-row .card-action-site {
  box-sizing: border-box;
  min-width: 0;
  min-height: 48px;
  padding: 8px 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-decoration: none;
  font-weight: 800;
  line-height: 1.1;
}

.vod-vote-row .action-label-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
}

.vod-vote-row .action-label-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vod-vote-row .card-emoji-img {
  width: 20px;
  height: 20px;
  display: block;
}

.vod-vote-row .vod-link-slot[aria-hidden="true"] {
  visibility: hidden;
  pointer-events: none;
}

.vod-done-actions[hidden],
#vod-modal-vote-row[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .vod-dialog {
    width: min(100%, 420px);
  }

  .vod-vote-row {
    gap: 8px;
  }

  .vod-vote-row .card-action,
  .vod-vote-row .card-action-site {
    min-height: 46px;
    padding: 6px 4px;
    font-size: 18px;
  }

  .vod-vote-row .action-label-text {
    display: none;
  }

  .vod-vote-row .action-label-emoji {
    display: inline-flex;
    margin: 0;
    font-size: 22px;
  }

  .vod-vote-row .card-emoji-img {
    width: 24px;
    height: 24px;
  }
}

.vod-modal-thanks {
  margin: 12px 0 0;
  font-weight: 700;
  line-height: 1.4;
}

.vod-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 16px 14px 48px;
}

.vod-page-hero {
  margin-bottom: 22px;
}

.vod-streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 2px solid var(--border, #111);
  border-radius: 12px;
  box-shadow: 3px 3px 0 0 var(--border, #111);
  background: var(--card, #fff);
}

.vod-streak-icon {
  font-size: 28px;
  line-height: 1;
}

.vod-streak-badge strong {
  display: block;
}

.vod-streak-badge span {
  font-size: 13px;
  opacity: 0.8;
}

.vod-page-title {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.vod-page-intro,
.vod-page-note {
  margin: 0 0 8px;
  line-height: 1.45;
}

.vod-section {
  margin-top: 22px;
}

.vod-section-title {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

.vod-ranks-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (min-width: 720px) {
  .vod-ranks-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.vod-rank-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border: 2px solid var(--border, #111);
  border-radius: 10px;
  background: var(--input, #f5f5f5);
}

.vod-rank-item.is-current {
  background: var(--card, #fff);
  box-shadow: 3px 3px 0 0 var(--border, #111);
}

.vod-rank-icon {
  font-size: 22px;
}

.vod-rank-days {
  font-size: 12px;
  opacity: 0.75;
}

.vod-rank-title {
  font-weight: 800;
}

.vod-history-details {
  margin: 0 0 10px;
  border: 2px solid var(--border, #111);
  border-radius: 12px;
  background: var(--card, #fff);
  box-shadow: 2px 2px 0 0 var(--border, #111);
  overflow: hidden;
}

.vod-history-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px 10px;
  align-items: center;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.vod-history-row::-webkit-details-marker {
  display: none;
}

.vod-history-num {
  font-weight: 800;
}

.vod-history-title {
  font-weight: 800;
}

.vod-history-meta,
.vod-history-votes {
  grid-column: 2 / -1;
  font-size: 13px;
  opacity: 0.8;
}

.vod-history-votes {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  font-weight: 700;
  opacity: 1;
}

.vod-history-body {
  padding: 0 14px 14px;
  border-top: 1px solid color-mix(in srgb, var(--border, #111) 35%, transparent);
}

.vod-history-cover {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(70vh, 560px);
  margin: 12px auto;
  object-fit: contain;
  border-radius: 8px;
  border: 2px solid var(--border, #111);
}

.vod-contest-box {
  margin: 12px 0;
  padding: 12px;
  border: 2px dashed var(--border, #111);
  border-radius: 10px;
}

.vod-contest-timer {
  margin: 0 0 6px;
  font-weight: 800;
}

.vod-contest-question {
  margin: 10px 0 8px;
  font-weight: 700;
}

.vod-contest-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.vod-contest-reason {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.vod-contest-reason[hidden] {
  display: none !important;
}

.vod-contest-reason textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px;
  border: 2px solid var(--border, #111);
  border-radius: 8px;
  background: var(--input, #fff);
  color: var(--foreground, #111);
  resize: vertical;
}

.vod-stages {
  margin: 12px 0;
  padding: 12px;
  border: 2px solid var(--border, #111);
  border-radius: 10px;
  background: var(--input, #f7f7f7);
}

.vod-stage-changed {
  margin: 8px 0 0;
  font-weight: 800;
}

.vod-history-news {
  margin: 10px 0;
  padding: 10px 12px;
  border-left: 4px solid var(--border, #111);
  font-weight: 600;
  line-height: 1.45;
  white-space: pre-wrap;
}

.vod-history-source {
  margin: 10px 0 14px;
  width: 100%;
}

.vod-history-source-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 2px solid var(--border, #111);
  border-radius: 8px;
  background: #eab308 !important;
  color: #111 !important;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none !important;
  box-shadow: 3px 3px 0 0 var(--border, #111);
  cursor: pointer;
}

.vod-history-source-btn:hover,
.vod-history-source-btn:focus-visible {
  background: #ca8a04 !important;
  color: #fff !important;
  outline: none;
}

.vod-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 2px solid var(--border, #111);
  border-radius: 8px;
  background: var(--foreground, #111);
  color: var(--background, #fff);
  font-weight: 700;
  cursor: pointer;
}

.vod-btn-ghost {
  background: var(--card, #fff);
  color: var(--foreground, #111);
}

.vod-comments-title {
  margin: 16px 0 8px;
  font-size: 1rem;
}

.vod-comments-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vod-comment-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--border, #111) 40%, transparent);
  border-radius: 8px;
}

.vod-comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border, #111);
}

.vod-comment-date {
  margin-left: 8px;
  font-size: 12px;
  opacity: 0.7;
}

.vod-comment-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vod-comment-form textarea {
  width: 100%;
  min-height: 64px;
  padding: 10px;
  border: 2px solid var(--border, #111);
  border-radius: 8px;
  background: var(--input, #fff);
  color: var(--foreground, #111);
  resize: vertical;
}

.vod-empty,
.vod-note {
  margin: 0;
  opacity: 0.8;
}
