/* Privilege-dependent controls stay hidden until scripts/privileges.js finds a matching rule */
.priv-hidden {
  display: none !important;
}

/* Comment entry forms on trip comments, styled to match the poll forms */

.comment-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 8px;
  font-family: Roboto, Helvetica, Arial, sans-serif;
}

.comment-reply {
  margin-left: 100px;
  max-width: 400px;
}

.comment-input {
  flex: 1;
  box-sizing: border-box;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid #d5dbe2;
  border-radius: 10px;
  background: #fafbfc;
  font-family: inherit;
  font-size: 14px;
  color: #222;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.comment-input:focus {
  border-color: #009966;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 153, 102, 0.15);
}

.comment-input::placeholder {
  color: #9aa3ad;
}

.comment-post {
  flex: 0 0 auto;
  padding: 9px 18px;
  border: none;
  border-radius: 10px;
  background: #009966;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s;
}

.comment-post:hover {
  background: #007a52;
}

/* Poll voting display on trip comments */

.poll-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 520px;
  margin-top: 10px;
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #222;
}

.poll-hint {
  font-size: 12px;
  color: #7a848e;
}

.poll-option {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #e3e7ec;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  text-align: left;
}

button.poll-option {
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

button.poll-option:hover {
  border-color: #009966;
}

button.poll-option:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 153, 102, 0.25);
}

.poll-option-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  background: #eef6f2;
  transition: width 0.3s ease;
}

.poll-option.is-mine .poll-option-bar {
  background: #cdeee0;
}

.poll-option-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.poll-option-mark {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border: 2px solid #c3ccd5;
  border-radius: 50%;
  background: #fff;
  color: #fff;
  font-size: 11px;
  line-height: 14px;
  text-align: center;
  box-sizing: border-box;
}

.poll-option.is-mine .poll-option-mark {
  border-color: #009966;
  background: #009966;
}

.poll-option-label {
  flex: 1;
  font-weight: 500;
}

.poll-option-count {
  min-width: 22px;
  text-align: right;
  font-weight: 600;
  color: #444;
  font-variant-numeric: tabular-nums;
}

.poll-option-voters {
  position: relative;
  z-index: 1;
  display: block;
  margin: 4px 0 0 28px;
  font-size: 12px;
  color: #6b7580;
}

/* Poll creation form on trip comments */

.poll-start {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid #009966;
  border-radius: 999px;
  background: #fff;
  color: #009966;
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s;
}

.poll-start:hover {
  background: #e6f5ef;
}

.poll-create {
  box-sizing: border-box;
  max-width: 520px;
  margin-top: 10px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #e3e7ec;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  font-family: Roboto, Helvetica, Arial, sans-serif;
  color: #222;
}

.poll-create-title {
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 600;
}

.poll-input {
  box-sizing: border-box;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d5dbe2;
  border-radius: 8px;
  background: #fafbfc;
  font-family: inherit;
  font-size: 14px;
  color: #222;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.poll-input:focus {
  border-color: #009966;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 153, 102, 0.15);
}

.poll-input::placeholder {
  color: #9aa3ad;
}

.poll-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.poll-option-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.poll-remove {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #f1f3f5;
  color: #666;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.poll-remove:hover {
  background: #fde8e8;
  color: #c0392b;
}

.poll-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
}

.poll-add {
  padding: 6px 12px;
  border: 1px dashed #009966;
  border-radius: 8px;
  background: transparent;
  color: #009966;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s;
}

.poll-add:hover {
  background: #e6f5ef;
}

.poll-submit {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: #009966;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s;
}

.poll-submit:hover {
  background: #007a52;
}
