/* Pass D — polls */

/* ===== pollPreviewStyle ===== */

.poll-preview {
  margin: .8rem 0;
  padding: 1rem;
  border: 1px solid #d5e4da;
  border-radius: 16px;
  background: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.poll-preview button,
.poll-preview input,
.poll-preview textarea {
  font-family: var(--font-ui);
}

.poll-preview .title {
  align-items: center;
}

.poll-preview h2 {
  font-size: 1rem;
}

.poll-preview p {
  margin: .25rem 0;
  color: var(--muted);
  font-size: .84rem;
}

.poll-preview-form {
  display: grid;
  gap: .45rem;
  margin-top: .65rem;
  padding-top: .65rem;
  border-top: 1px solid var(--line);
}

.poll-preview-form input {
  min-height: 38px;
  padding: .45rem .6rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: .72rem;
}

.poll-preview-form .poll-add-choice {
  background: #fff;
  color: var(--deep);
  font-size: .72rem;
}

.poll-preview-form small {
  color: var(--muted);
}

/* ===== pollDisplayStyle ===== */

.poll-preview {
  margin: .45rem 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  container-type: inline-size;
}

.poll-preview h2 {
  font-size: .92rem;
}

.poll-preview p {
  font-size: .77rem;
}

.poll-preview .title {
  align-items: center;
  padding: .1rem 0;
  margin-bottom: .35rem;
}

.poll-preview > .title > .eyebrow {
  margin: 0;
}

.poll-active {
  position: relative;
  margin: .35rem 0;
  padding: .35rem .5rem;
  border: 1px solid #d9e2dc;
  border-radius: 9px;
  background: #fff;
  box-shadow: none;
}

.poll-active:first-of-type {
  margin-top: .35rem;
}

.poll-active:last-of-type {
  margin-bottom: 0;
}

.poll-active-head {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: .35rem;
  min-height: 28px;
}

.poll-active .coach-card-menu {
  position: static;
  flex: 0 0 auto;
}

.poll-delete {
  align-self: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--red);
  font-size: 1.05rem;
  line-height: 1;
}

.poll-active-toggle {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
  align-items: center;
  gap: .35rem;
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent !important;
  color: #26352c !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.18;
  text-align: left;
  cursor: pointer;
}

.poll-active-toggle:hover, .poll-active-toggle:focus {
  background: transparent !important;
  color: #26352c !important;
  box-shadow: none !important;
}

.poll-active-heading {
  display: grid;
  min-width: 0;
  gap: .12rem;
}

.poll-active-title {
  min-width: 0;
  color: #26352c !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}

.poll-active-date {
  color: #7b887f !important;
  font-size: .62rem;
  font-weight: 600;
  line-height: 1.1;
}

.poll-active-chevron {
  color: #26352c !important;
  font-size: .9rem;
  font-weight: 900;
}

.poll-response-status {
  align-self: center;
  padding: .13rem .34rem;
  border: 1px solid #d7dfda;
  border-radius: 999px;
  color: #7b887f;
  font-size: .57rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.poll-response-status.is-answered {
  border-color: #a9d2b5;
  color: #197346;
  background: #f2faf4;
}

.poll-response-status.is-pending {
  background: #f8faf8;
}

.poll-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: .15rem;
  margin-top: .25rem;
}

.poll-options button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  min-width: 0;
  min-height: 30px;
  padding: .16rem .4rem;
  border: 1px solid #d7e0da;
  border-radius: 6px;
  background: #fff;
  color: var(--deep);
  font-size: .71rem;
  line-height: 1.2;
  text-align: left;
}

.poll-options button.selected {
  border-color: #19834a;
  background: #f3fbf5;
  box-shadow: inset 3px 0 0 #19834a;
}

.poll-options button:not(.selected) {
  border-color: #d7e0da;
  background: #fff;
  box-shadow: none;
  color: var(--deep);
}

.poll-options button span {
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.poll-options button small {
  flex: 0 0 auto;
  align-self: center;
  width: auto;
  min-width: 5.1rem;
  padding: 0;
  color: #7b887f;
  font-size: .57rem;
  font-weight: 800;
  white-space: nowrap;
  text-align: right;
}

@media (max-width: 520px) {
  .poll-options button {
    min-height: 32px;
  }
  .poll-active-date {
    font-size: .6rem;
  }
  .poll-response-status {
    font-size: .54rem;
    padding: .12rem .3rem;
  }
}
