/* ================================================================
   reviews.css — Jama App
   Sistema de calificaciones: modal de rating + display en restaurante
   ================================================================ */

/* ── MODAL DE CALIFICACIÓN ── */
#review-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 2000; display: flex; align-items: flex-end;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
#review-modal-overlay.open { opacity: 1; pointer-events: all; }
#review-modal {
  background: #fff; border-radius: 28px 28px 0 0; width: 100%;
  max-width: 500px; margin: 0 auto;
  padding: 0 0 calc(1.5rem + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform .45s cubic-bezier(.34,1.2,.64,1);
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 -8px 64px rgba(25,19,15,0.28);
}
#review-modal-overlay.open #review-modal { transform: translateY(0); }
.rv-handle {
  width: 40px; height: 4px; background: #e0e0e0;
  border-radius: 99px; margin: 12px auto 20px;
}
.rv-title {
  font-family: var(--font-display, sans-serif);
  font-size: 1.4rem; color: #1a1a1a; letter-spacing: .5px;
  text-align: center; margin-bottom: 4px; padding: 0 1.5rem;
}
.rv-subtitle {
  font-size: .85rem; color: #888; text-align: center;
  margin-bottom: 1.5rem; padding: 0 1.5rem;
}

/* ── ESTRELLAS INTERACTIVAS ── */
.rv-stars-wrap {
  display: flex; justify-content: center;
  gap: .5rem; margin-bottom: .75rem;
}
.rv-star {
  font-size: 2.8rem; cursor: pointer; color: #EAE6E1;
  transition: color .15s, transform .2s cubic-bezier(0.34,1.56,0.64,1); line-height: 1;
  -webkit-user-select: none; user-select: none;
}
.rv-star.active { color: #FBBF24; text-shadow: 0 4px 12px rgba(251,191,36,.45); }
.rv-star:hover  { transform: scale(1.2); }
.rv-stars-label {
  text-align: center; font-size: .85rem; font-weight: 600;
  color: #888; min-height: 1.2em; margin-bottom: 1.25rem;
}

/* ── TEXTAREA ── */
.rv-comment-wrap { padding: 0 1.25rem; margin-bottom: 1.25rem; }
.rv-comment {
  width: 100%; padding: 1rem;
  border: 1.5px solid #e5e5e5; border-radius: 14px;
  font-family: inherit; font-size: .9rem; color: #1a1a1a;
  resize: none; outline: none; transition: border-color .15s;
  box-sizing: border-box; min-height: 90px;
}
.rv-comment:focus { border-color: #FF3D2E; box-shadow: 0 0 0 4px rgba(255,61,46,.12); }
.rv-comment::placeholder { color: #bbb; }

/* ── BOTONES ── */
.rv-actions { padding: 0 1.25rem; display: flex; flex-direction: column; gap: .6rem; }
.rv-submit {
  width: 100%; padding: 1rem; background: #FF3D2E; color: #fff;
  border: none; border-radius: 99px; font-family: inherit;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  transition: background .15s, transform .15s;
  box-shadow: 0 4px 16px rgba(255,61,46,.3);
}
.rv-submit:hover:not(:disabled) { background: #e02a1c; transform: scale(1.02); }
.rv-submit:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.rv-skip {
  width: 100%; padding: .85rem; background: transparent;
  border: 1.5px solid #e5e5e5; border-radius: 99px;
  font-family: inherit; font-size: .9rem; font-weight: 600;
  color: #888; cursor: pointer; transition: background .15s;
}
.rv-skip:hover { background: #f5f5f5; }

/* ── SECCIÓN DE RESEÑAS EN MODAL DEL RESTAURANTE ── */
.reviews-section {
  padding: 1.25rem 1.25rem 1.5rem;
  border-top: 1px solid var(--color-gray-4, #e5e5e5);
  margin-top: .5rem;
}
.reviews-section-title {
  font-size: 1rem; font-weight: 800; color: #1a1a1a;
  margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem;
}

/* Promedio */
.reviews-avg {
  display: flex; align-items: center; gap: .85rem;
  background: var(--color-bg, #f8f8f8);
  border: 1.5px solid var(--color-gray-4, #e5e5e5);
  border-radius: 16px; padding: 1rem 1.25rem; margin-bottom: 1rem;
}
.reviews-avg-num {
  font-size: 2.5rem; font-weight: 800; color: #1a1a1a; line-height: 1;
}
.reviews-avg-stars { color: #FBBF24; font-size: 1.1rem; letter-spacing: 2px; }
.reviews-avg-count { font-size: .78rem; color: #888; margin-top: 2px; }

/* Lista */
.reviews-list { display: flex; flex-direction: column; gap: .75rem; }
.review-item {
  background: var(--color-bg, #f8f8f8);
  border-radius: 14px; padding: 1rem;
  border: 1px solid var(--color-gray-4, #ececec);
}
.review-item-header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: .35rem;
}
.review-item-stars { color: #FBBF24; font-size: 1rem; letter-spacing: 1px; }
.review-item-date  { font-size: .72rem; color: #bbb; font-weight: 600; }
.review-item-name  {
  font-size: .85rem; font-weight: 700; color: #444; margin-bottom: .3rem;
}
.review-item-comment {
  font-size: .85rem; color: #555; line-height: 1.55;
}

/* Empty */
.reviews-empty {
  text-align: center; padding: 1.5rem;
  color: #bbb; font-size: .875rem;
}

/* ── STATUS BADGES (schedule) ── */
.modal-state.closing-soon {
  background: #fef9c3; color: #854d0e; border-color: #fde68a;
}
.modal-state.last-orders {
  background: #fee2e2; color: #dc2626; border-color: #fca5a5;
}
.rc-schedule-badge {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 99px; margin-top: 3px;
}
.rc-schedule-badge--warn   { background: #fef9c3; color: #854d0e; }
.rc-schedule-badge--urgent { background: #fee2e2; color: #dc2626; }
.rc-schedule-badge--closed { background: #f3f4f6; color: #6b7280; }
