@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

/* Record button gradient styling */
body, html {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
}
#record-button {
  background: linear-gradient(90deg, #4AB7EF 0%, #9B74C7 100%);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
#record-button:hover {
  background: linear-gradient(90deg, #9B74C7 0%, #4AB7EF 100%);
}
/* Add this to your existing CSS */

.save-button {
  background-color: #40baea;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 8px 16px;
  font-size: 14px;
  margin: 10px 0;
  cursor: pointer;
  align-self: center;
  transition: background-color 0.3s;
}

.save-button:hover {
  background-color: #2a9fd8;
}

.typing {
  font-style: italic;
  opacity: 0.7;
}


.input-mode-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Width of the slider's (-)/(+) columns. The Send button below centres on the (+) column. */
:root {
  --rating-scale-column-width: clamp(72px, 18vw, 112px);
  --send-button-width: 72px;
}

.slider-panel {
  width: 100%;
}

.slider-panel.hidden,
.text-panel.hidden {
  display: none;
}

.text-panel {
  width: 100%;
  display: flex;
}

.text-panel .chat-input {
  flex: 1;
}

.add-note-link {
  border: none;
  background: none;
  padding: 6px 0 0;
  color: #1c5d78;
  font-weight: 700;
  font-size: 0.92em;
  text-align: left;
  width: 100%;
  display: inline-flex;
  justify-content: flex-start;
  align-items: center;
  cursor: pointer;
  gap: 8px;
}

.add-note-link:hover,
.add-note-link:focus {
  color: #0d3c4f;
}

.add-note-link.notes-active {
  color: #0d3c4f;
}

.add-note-link::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 6px solid currentColor;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  transition: transform 0.2s ease;
  margin-left: 4px;
}

.add-note-link.notes-active::after {
  transform: rotate(90deg);
}

.rating-slider {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: stretch;
  padding-bottom: 22px;
}

.rating-slider-scale {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.rating-slider-track {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
}

.slider-thumb-value {
  position: absolute;
  top: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(calc(-50% + 2px), -50%);
  color: #6055a5;
  font-weight: 700;
  font-size: 1em;
  line-height: 1;
  text-align: center;
  pointer-events: none;
  z-index: 2;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.9);
}

/* Slider end labels (question "labels": {"min", "max"}), same layout as RetroReflex. */
.rating-scale-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--rating-scale-column-width);
  min-width: 72px;
  max-width: 112px;
  min-height: 24px;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.rating-scale-label {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: #555;
  font-weight: 600;
  text-align: center;
  width: 100%;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.2;
  pointer-events: none;
}

.rating-scale-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1em;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.rating-scale-icon:focus-visible {
  outline: 2px solid #40baea;
  outline-offset: 2px;
}

.rating-scale-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.rating-scale-icon.minus {
  background: #4AB7EF;
}

.rating-scale-icon.plus {
  background: #9B74C7;
}

.rating-slider input[type="range"] {
  width: 100%;
  flex: 1;
  appearance: none;
  height: 24px;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.rating-slider input[type="range"]:focus {
  outline: none;
}

.rating-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 12px;
  background: linear-gradient(90deg, #4AB7EF 0%, #9B74C7 100%);
  border-radius: 999px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.rating-slider input[type="range"]::-moz-range-track {
  height: 12px;
  background: linear-gradient(90deg, #4AB7EF 0%, #9B74C7 100%);
  border-radius: 999px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.rating-slider input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffffff, #c0c4c7 55%, #7f858a);
  border: 1px solid #a0a5aa;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
  margin-top: -8px;
}

.rating-slider input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffffff, #c0c4c7 55%, #7f858a);
  border: 1px solid #a0a5aa;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.rating-submit-btn {
  background: #40baea;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: 0 6px 16px rgba(64, 186, 234, 0.25);
  white-space: nowrap;
}

.rating-submit-btn:hover {
  background: #2a9fd8;
}

.rating-submit-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.paper-plane-icon,
.paper-plane-icon-right,
.mic-icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.paper-plane-icon {
  transform: translate(-2px) rotate(45deg);
}

.paper-plane-icon-right {
  transform: translateX(-2px) rotate(45deg);
}

/* Pill like the app's primary buttons (same gradient and radius as "Create Your Map"). */
#send-button.send-btn {
  background: linear-gradient(90deg, #43B4E5 0%, #605CA9 100%);
  color: #fff;
  border: none;
  border-radius: 24px;
  width: var(--send-button-width);
  height: 44px;
  padding: 0;
  flex-shrink: 0;
  /* Same vertical line as the slider's (+) button: both rows end at the same edge. */
  margin-right: calc((var(--rating-scale-column-width) - var(--send-button-width)) / 2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.2s;
}

#send-button.send-btn:hover {
  background: linear-gradient(90deg, #43B4E5 0%, #605CA9 100%);
  filter: brightness(1.05);
}

#send-button.send-btn:disabled,
#send-button.send-btn.disabled {
  filter: none;
}

#send-button .paper-plane-icon-right {
  width: 24px;
  height: 24px;
}
/* Mike button gradient styling */
.mike-btn {
  background: linear-gradient(90deg, #4AB7EF 0%, #9B74C7 100%);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.mike-btn:hover {
  background: linear-gradient(90deg, #9B74C7 0%, #4AB7EF 100%);
}

.hidden {
  display: none !important;
}