/* ============================================================
   FEEDBACK WIDGET — SIGMA UNGRD
   Botón flotante + modal de comentarios
   ============================================================ */

/* ---- FAB button ---- */
.feedback-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #213362;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 50px;
  padding: 10px 20px 10px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(33, 51, 98, 0.38);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  letter-spacing: 0.01em;
  font-family: inherit;
}

.feedback-fab:hover {
  background: #1B4472;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(33, 51, 98, 0.48);
}

.feedback-fab .material-icons {
  font-size: 20px;
  line-height: 1;
}

/* ---- Overlay ---- */
.feedback-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.feedback-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

/* ---- Modal ---- */
.feedback-modal {
  position: fixed;
  bottom: 88px;
  right: 28px;
  z-index: 10000;
  width: 368px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(33, 51, 98, 0.22), 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(16px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s;
  overflow: hidden;
}

.feedback-modal.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

/* ---- Header ---- */
.feedback-modal__header {
  background: #213362;
  padding: 18px 20px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 3px solid #FFCD00;
}

.feedback-modal__title {
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 4px;
}

.feedback-modal__subtitle {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  margin: 0;
}

.feedback-modal__close {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  min-width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 10px;
  transition: background 0.2s;
  font-family: inherit;
}

.feedback-modal__close:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* ---- Scrollable body ---- */
.feedback-modal__body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 260px);
  overflow-y: auto;
}

/* ---- Section label ---- */
.feedback-section-label {
  font-size: 11px;
  font-weight: 700;
  color: #213362;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

/* ---- Emoji rating ---- */
.feedback-emojis {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.feedback-emoji-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 4px 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
  font-size: 26px;
  line-height: 1;
  font-family: inherit;
}

.feedback-emoji-btn:hover {
  background: #EAF2FA;
  border-color: #76A2BE;
  transform: translateY(-2px);
}

.feedback-emoji-btn.is-selected {
  background: #EAF2FA;
  border-color: #213362;
}

.feedback-emoji-btn__score {
  font-size: 10px;
  font-weight: 600;
  color: #9ca3af;
}

.feedback-emoji-btn.is-selected .feedback-emoji-btn__score {
  color: #213362;
}

/* ---- Comment type ---- */
.feedback-types {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feedback-type-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid #d1d5db;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  font-family: inherit;
}

.feedback-type-btn:hover {
  border-color: #76A2BE;
  color: #213362;
}

.feedback-type-btn.is-selected {
  background: #213362;
  border-color: #213362;
  color: #fff;
}

/* ---- Email input ---- */
.feedback-email-input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  font-size: 13px;
  color: #111827;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  font-family: inherit;
}

.feedback-email-input:focus {
  border-color: #213362;
  box-shadow: 0 0 0 3px rgba(33, 51, 98, 0.12);
}

/* ---- Textarea ---- */
.feedback-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  font-size: 13px;
  color: #111827;
  resize: vertical;
  min-height: 88px;
  max-height: 160px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.feedback-textarea:focus {
  border-color: #213362;
  box-shadow: 0 0 0 3px rgba(33, 51, 98, 0.12);
}

.feedback-char-count {
  text-align: right;
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
}

/* ---- Footer / submit ---- */
.feedback-modal__footer {
  padding: 4px 20px 20px;
}

.feedback-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #1B4472 0%, #213362 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  letter-spacing: 0.01em;
  font-family: inherit;
}

.feedback-submit-btn:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

.feedback-submit-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

/* ---- Success state ---- */
.feedback-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 16px;
  text-align: center;
}

.feedback-success__icon {
  font-size: 52px;
  line-height: 1;
}

.feedback-success__title {
  font-size: 18px;
  font-weight: 700;
  color: #213362;
  margin: 0;
}

.feedback-success__text {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
  line-height: 1.5;
}

/* ---- Mobile: botón solo icono ---- */
@media (max-width: 767px) {
  .feedback-fab {
    bottom: 20px;
    right: 16px;
    padding: 12px;
    border-radius: 50%;
    gap: 0;
  }

  /* Ocultar texto "Comentarios" — solo icono en móvil */
  .feedback-fab > span:not(.material-icons) {
    display: none;
  }

  .feedback-fab .material-icons {
    font-size: 22px;
  }

  .feedback-modal {
    bottom: 76px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
  }
}
