:root{
  --bacula-red: #b61717;
  --panel-radius: 8px;
  --shadow: 0 14px 35px rgba(0,0,0,.18);
  --border: 2px solid var(--bacula-red);
  --bg: #ffffff;
  --text: #222;
  --muted: #666;
}

/* Pill */
.feedback-label {
  font-size: 14px;
  background-color: #ddd;
  cursor: default;
  margin-left: auto;
  padding: .3rem .6rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: .75rem;
  max-width: 100%;
  align-items: center;
  overflow: hidden;
  display: inline-flex;
}

.feedback-link {
  margin-left: auto;
  cursor: pointer;
  color: #222;
  font-weight: 480;
}

.feedback-link::before {
  content: "Send feedback";
}

.feedback-link:hover {
  color: #222;
}

.wy-nav-content h1 {
  display: flex;
  align-items: center;
}

/* Form */
.feedback-panel{
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: min(30vw, 420px);
  max-width: 92vw;
  height: 480px;
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  border: var(--border);
  border-radius: var(--panel-radius);
  box-shadow: var(--shadow);
  z-index: 9999;
  flex-direction: column;
  overflow: hidden;
}

.feedback-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  background: #fff;
}

.feedback-title{
  font-weight: 700;
}

.feedback-close{
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.feedback-form{
  padding: 12px;
  gap: 10px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.feedback-hint {
  font-size: 12px;
  color: #333;
  margin: 0;
}

.feedback-form input,
.feedback-form select,
.feedback-form textarea{
  width: 100%;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 10px;
  padding: 10px 10px;
  font-size: 14px;
  outline: none;
}

.feedback-select:invalid {
  color: #666;
}
.feedback-select option {
  color: #222;
}

.feedback-form input:focus,
.feedback-form select:focus,
.feedback-form textarea:focus{
  border-color: var(--bacula-red);
  box-shadow: 0 0 0 3px rgba(192,24,24,.15);
}

.feedback-form textarea{
  flex: 1;
  resize: none;
  min-height: 140px;
}

.feedback-actions{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
}

.feedback-status{
  font-size: 13px;
  color: var(--muted);
  min-height: 1.2em;
}

.feedback-send{
  background: var(--bacula-red);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}

.feedback-send:disabled{
  opacity: .65;
  cursor: not-allowed;
}

.selection-bubble{
  --w: 36px;
  --h: calc(var(--w) * 9 / 16);
  width: var(--w);
  height: var(--h);
  position: fixed;
  display: none;
  align-items: center;
  justify-content: center;

  background: #fff;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,.10);

  padding: 0;
  cursor: pointer;
}

.selection-bubble::before{
  content:"";
  position: absolute;
  left: 0px;
  top: -5px;

  width: 5px;
  height: 7px;
  background: rgba(0,0,0,.18);

  clip-path: polygon(0 0, 0 100%, 100% 100%);
  transform: rotate(-25deg);

  box-shadow: 0 2px 4px rgba(0,0,0,.08);
}

/* three dots in the center */
.selection-bubble .dots{
  --dot-color: rgba(0,0,0,.3);
  width: 3px;
  height: 3px;
  background: var(--dot-color);
  border-radius: 50%;
  box-shadow: -6px 0 0 var(--dot-color), 6px 0 0 var(--dot-color);
}

.selection-bubble:focus-visible{
  outline: 2px solid #3b82f6;
  outline-offset: 1px;
}
