.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  border-radius: 12px;
  padding: 20px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
  margin-top: 0;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10001;
  padding: 0;
  margin: 0;
}

.modal-answer {
  background: #f6f6f6;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 1rem;
  max-height: 150px;
  overflow-y: auto;
  font-size: 0.95rem;
}

textarea#corrected-answer {
  width: 100%;
  margin: 10px 0;
  resize: vertical;
}

/* Moldura da área "Lecionar IA" */
.modal-box-wrapper {
  border: 1px solid #ccc;
  border-radius: 30px;
  padding: 14px;
  margin-top: 20px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

/* Cabeçalho com título flutuante e moldura recortada */
.modal-box-header {
  position: absolute;
  top: -0.7em;
  left: 44px;
  background: white;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
}

.modal-divider-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #555;
  margin: 0;
}

/* Wrapper da área de texto */
.modal-input-wrapper {
  position: relative;
  background-color: #ffffff;
  border-radius: var(--border-radius);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0;
  width: 100%;
  max-width: var(--max-width);
}

/* Área de texto */
.modal-input-wrapper textarea {
  width: 100%;
  padding: 0.75rem 1.5rem 0 1.5rem;
  background-color: transparent;
  border: none;
  border-radius: 30px 30px 0px 0px;
  font-size: 1rem;
  line-height: 1.5;
  outline: none;
  resize: vertical;
  overflow-y: auto;
  box-sizing: border-box;
  padding-right: 100px; /* espaço maior para dois botões */
}

/* Botões agrupados dentro do input-wrapper */
.modal-input-buttons {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Botão de varinha */
#ajustar-feedback {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

#ajustar-feedback img {
  width: 30px;
  height: 30px;
  display: block;
}

/* Botão de envio */
.modal-input-wrapper .send-button {
  background-color: #000000;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  z-index: 2;
}

.modal-input-wrapper .send-button svg:nth-of-type(2) {
  display: none;
}

.modal-input-wrapper .send-button.processing svg:nth-of-type(1) {
  display: none;
}

.modal-input-wrapper .send-button.processing svg:nth-of-type(2) {
  display: inline;
}
