/* PharmAchieve Live Q&A + Live Polls Styles */
html {
  overflow-y: scroll;
}

body {
  font-family: 'Roboto', 'Open Sans', sans-serif;
  font-size: 1.9em;
  font-weight: 400;
}

.directions {
  margin-top: 3px;
  margin-bottom: 10px;
  color: grey;
  margin-left: auto;
  margin-right: auto;
  width: 91%;
  border-radius: 20px;
  border: silver 1px solid;
  padding: 5px 27px;
  background: whitesmoke;
}

.sunken {
  background-color: hsl(0, 0%, 79%) !important;
  background-repeat: repeat-x;
  background-image: linear-gradient(#e0e0e0, #c9c9c9);
  border-color: #c9c9c9 #c9c9c9 hsl(0, 0%, 68.5%);
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.69);
  -webkit-font-smoothing: antialiased;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.18);
}

.highlight {
  background: lightyellow !important;
}

textarea#question {
  font-size: 1.1em;
}

.answered_now {
  font-weight: 600;
}

.time {
  float: left;
  padding-left: 5px;
  color: #666;
}

.submitter {
  float: left;
  color: #555;
}

.row {
  border-bottom: 1px solid lightgray;
}

.rowContainer {
  padding-top: 3px;
  padding-bottom: 3px;
}

.editable-qtext {
  cursor: pointer;
  overflow-wrap: break-word;
  word-break: break-word;
}
.editable-qtext:hover {
  background-color: rgba(255, 255, 200, 0.4);
  border-radius: 3px;
}
.qtext-display {
  overflow-wrap: break-word;
  word-break: break-word;
}
.inline-edit-box {
  width: 100%;
  font-size: 0.95em;
  margin-bottom: 4px;
}
.admin-panel-box {
  margin-top: 10px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 15px;
  font-size: 0.82em;
}

/* --- LIVE POLLS STYLES --- */
.poll-card {
  background: #ffffff;
  border: 2px solid #2980b9;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 28px;
  box-shadow: 0 3px 10px rgba(41, 128, 185, 0.12);
}

.poll-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #eaeaea;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.poll-title-area {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.poll-badge-open {
  background-color: #27ae60;
  color: #fff;
  font-size: 0.72em;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.poll-badge-closed {
  background-color: #7f8c8d;
  color: #fff;
  font-size: 0.72em;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.poll-votes-badge {
  background-color: #ebf5fb;
  color: #1f618d;
  border: 1px solid #aed6f1;
  font-size: 0.78em;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 12px;
}

.poll-options-grid {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.poll-opt-btn {
  flex: 1 1 60px;
  min-width: 58px;
  padding: 10px 8px;
  font-size: 1.15em;
  font-weight: 700;
  border-radius: 6px;
  border: 2px solid #bdc3c7;
  background: #f8f9f9;
  color: #2c3e50;
  transition: all 0.12s ease;
  text-align: center;
  cursor: pointer;
}

.poll-opt-btn:hover:not(:disabled) {
  border-color: #2980b9;
  background: #ebf5fb;
  transform: translateY(-1px);
}

.poll-opt-btn.selected {
  border-color: #27ae60;
  background: #2ecc71;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(46, 204, 113, 0.35);
}

.poll-opt-btn:disabled {
  opacity: 0.68;
  cursor: not-allowed;
}

.poll-graph-container {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #e0e0e0;
}

.poll-bar-row {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  gap: 10px;
}

.poll-bar-row.admin-clickable {
  cursor: pointer;
}

.poll-bar-label {
  width: 38px;
  height: 32px;
  line-height: 30px;
  text-align: center;
  font-weight: 700;
  font-size: 0.95em;
  border-radius: 5px;
  background: #ecf0f1;
  color: #2c3e50;
  border: 1px solid #d0d3d4;
  flex-shrink: 0;
}

.poll-bar-row.is-correct .poll-bar-label {
  background: #27ae60;
  color: #fff;
  border-color: #1e8449;
}

.poll-bar-track {
  flex-grow: 1;
  height: 30px;
  background: #f2f4f4;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  border: 1px solid #e5e7e9;
}

.poll-bar-fill {
  height: 100%;
  border-radius: 5px 0 0 5px;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.poll-bar-stats {
  width: 115px;
  text-align: right;
  font-size: 0.85em;
  font-weight: 600;
  color: #34495e;
  flex-shrink: 0;
}

.poll-status-note {
  font-size: 0.8em;
  color: #666;
  margin-top: 4px;
}

.poll-admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

/* --- OBS BROADCAST VIEW STYLES --- */
body.broadcast-mode {
  background: transparent;
}
.broadcast-poll-banner {
  background: linear-gradient(135deg, #1f618d 0%, #2980b9 100%);
  color: #ffffff;
  border-radius: 8px;
  padding: 16px 22px;
  margin-top: 8px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.broadcast-poll-banner .pulse-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: #2ecc71;
  border-radius: 50%;
  margin-right: 10px;
  box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.35);
}
.broadcast-poll-title {
  font-size: 1.2em;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.broadcast-poll-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 14px;
  border-radius: 16px;
  font-size: 0.9em;
  font-weight: 600;
}
