/* ============================================================
   Learnio Reviews
   ============================================================ */

.lr-wrap {
  position: relative;
}

/* ── Cabecera ── */

.lr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ── Botón abrir modal ── */

.lr-open-btn {
  background: var(--purple-stroke, #4a148c);
  color: #fff;
  border: none;
  border-radius: 2rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.lr-open-btn:hover {
  opacity: 0.85;
}

.lr-already {
  font-size: 0.8125rem;
  color: #727272;
}

/* ── Lista vacía ── */

.lr-empty {
  font-size: 0.875rem;
  color: #727272;
}

/* ── Modal overlay ── */

.lr-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lr-modal[hidden] {
  display: none;
}

.lr-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

/* ── Modal box ── */

.lr-modal__box {
  position: relative;
  z-index: 1;
  background: #fff;
  width: min(480px, 92vw);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
}

.lr-modal__box h3 {
  margin: 0;
  font-size: 1.125rem;
  color: #333;
}

.lr-modal__close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #727272;
  transition: color 0.15s;
}

.lr-modal__close:hover {
  color: #333;
}

/* ── Estrellas ── */

.lr-stars {
  display: flex;
  gap: 0.5rem;
}

.lr-star {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 2rem;
  height: 2rem;
  color: #d9d9d9;
  transition: color 0.15s, transform 0.1s;
}

.lr-star svg {
  width: 100%;
  height: 100%;
}

.lr-star--active {
  color: #fc9a3f;
}

.lr-star--active svg {
  fill: #fc9a3f;
  stroke: #fc9a3f;
}

.lr-star:hover {
  transform: scale(1.15);
}

.lr-stars-label {
  font-size: 0.8125rem;
  color: #727272;
  margin: -0.5rem 0 0;
}

/* ── Textarea ── */

.lr-textarea {
  width: 100%;
  border: 1.5px solid #e9e9e9;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.lr-textarea:focus {
  border-color: var(--purple-stroke, #4a148c);
}

/* ── Error ── */

.lr-error {
  font-size: 0.8125rem;
  color: #d13379;
  margin: -0.5rem 0 0;
}

.lr-error[hidden] {
  display: none;
}

/* ── Botón submit ── */

.lr-submit-btn {
  background: linear-gradient(135deg, #fc9a3f 0%, #d13379 100%);
  color: #fff;
  border: none;
  border-radius: 2rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  align-self: flex-end;
}

.lr-submit-btn:hover {
  opacity: 0.88;
}

.lr-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Formulario libre ── */

.lr-free-form {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.lr-free-form__title {
  margin: 0;
}

.lr-free-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lr-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #333;
}

.lr-select {
  border: 1.5px solid #e9e9e9;
  border-radius: 0.75rem;
  padding: 0.625rem 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  background: #f9f9f9;
  cursor: pointer;
  transition: border-color 0.2s;
}

.lr-select:focus {
  border-color: var(--purple-stroke, #4a148c);
  background: #fff;
}

.lr-success {
  font-size: 0.875rem;
  color: #2e7d32;
  font-weight: 600;
}

.lr-success[hidden] {
  display: none;
}

.lr-login-notice {
  font-size: 0.875rem;
  color: #727272;
}

/* ── Responsive ── */

@media (max-width: 480px) {
  .lr-modal__box {
    padding: 1.5rem;
  }
}
