/* peertube-plugin-rbg-poll */

.rbg-poll-block,
.rbg-poll-overlay {
  box-sizing: border-box;
  font-size: 15px;
  line-height: 1.4;
}

.rbg-poll-block *,
.rbg-poll-overlay * {
  box-sizing: border-box;
}

/* ---------- Block über den Kommentaren ---------- */

.rbg-poll-block {
  margin: 1rem 0 1.5rem;
  padding: 1rem;
  border: 1px solid rgba(128, 128, 128, 0.4);
  border-radius: 8px;
  color: var(--mainForegroundColor, inherit);
}

/* ---------- Overlay im Player ---------- */

.rbg-poll-overlay {
  position: absolute;
  left: 50%;
  bottom: 70px;
  transform: translateX(-50%);
  z-index: 30;
  width: min(440px, calc(100% - 24px));
  max-height: calc(100% - 90px);
  overflow-y: auto;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.88);
  color: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.rbg-poll-overlay .rbg-poll-option {
  border-color: rgba(255, 255, 255, 0.45);
}

.rbg-poll-close {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 22px;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
}

/* ---------- gemeinsame Bausteine ---------- */

.rbg-poll-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.rbg-poll-question {
  font-weight: 600;
  margin-bottom: 8px;
}

.rbg-poll-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0 0 6px;
  padding: 8px 12px;
  overflow: hidden;
  border: 1px solid rgba(128, 128, 128, 0.6);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.rbg-poll-option:disabled {
  cursor: default;
  opacity: 1;
}

.rbg-poll-option:not(:disabled):hover,
.rbg-poll-option:not(:disabled):focus-visible {
  border-color: var(--mainColor, #f2690d);
}

.rbg-poll-option.is-selected {
  border-color: var(--mainColor, #f2690d);
  font-weight: 600;
}

.rbg-poll-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  background: var(--mainColor, #f2690d);
  opacity: 0.28;
  transition: width 0.3s ease;
}

.rbg-poll-label,
.rbg-poll-count {
  position: relative;
  z-index: 1;
}

.rbg-poll-count {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.rbg-poll-meta,
.rbg-poll-muted {
  margin-top: 4px;
  font-size: 13px;
  opacity: 0.75;
}

.rbg-poll-error {
  margin-top: 6px;
  color: #d93025;
  font-size: 13px;
}

.rbg-poll-overlay .rbg-poll-error {
  color: #ff8a80;
}

/* ---------- Verwaltung ---------- */

.rbg-poll-btn {
  padding: 4px 12px;
  border: 1px solid rgba(128, 128, 128, 0.6);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.rbg-poll-btn:hover {
  border-color: var(--mainColor, #f2690d);
}

.rbg-poll-btn.is-primary {
  border-color: var(--mainColor, #f2690d);
  background: var(--mainColor, #f2690d);
  color: #fff;
}

.rbg-poll-btn.is-danger {
  margin-left: auto;
  border-color: #d93025;
  color: #d93025;
}

.rbg-poll-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.rbg-poll-form .rbg-poll-input {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(128, 128, 128, 0.6);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
}

.rbg-poll-form .rbg-poll-input.rbg-poll-short {
  display: inline-block;
  width: 84px;
  margin-bottom: 0;
}

.rbg-poll-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.root-header .publish-button {
  display: none;
}

.show-publish-button .root-header .publish-button {
  display: inline-block;
}
