/* Review Cards WooCommerce — Frontend */

@keyframes rcw-fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   SEÇÃO
   ========================================================= */
.rcw-section {
  width: 100%;
  box-sizing: border-box;
}

/* =========================================================
   CABEÇALHO
   ========================================================= */
.rcw-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.rcw-rating-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rcw-header-stars { display: flex; gap: 2px; }
.rcw-header-stars svg { width: 28px; height: 28px; }

.rcw-header-count {
  font-size: 16px;
  color: #000;
  font-weight: 500;
  cursor: pointer;
}

.rcw-header-count:hover { text-decoration: underline; }

.rcw-header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.rcw-write-btn:hover { background: #f5f5f5 !important; }

.rcw-filter-btn {
  background: #fff;
  border: 1px solid #d0d0d0;
  padding: 10px 12px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rcw-filter-btn:hover { background: #f5f5f5; }

/* =========================================================
   LABEL DE CATEGORIA
   ========================================================= */
.rcw-category-label {
  display: inline-block;
  background: #e8f0fe;
  color: #1a56db;
  font-size: 13px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 20px;
  margin-right: 4px;
}

/* =========================================================
   GRID
   ========================================================= */
.rcw-grid-wrapper { width: 100%; }

.rcw-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* =========================================================
   CARD
   ========================================================= */
.rcw-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
  animation: rcw-fadeInUp 0.5s ease forwards;
  transition: box-shadow 0.3s ease;
}

.rcw-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }

.rcw-card__media {
  width: 100%;
  background: #f9f9f9;
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
}

.rcw-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rcw-card__body { padding: 16px; }

.rcw-card__header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.rcw-name {
  font-weight: 600;
  font-size: 14px;
  color: #000;
  margin: 0;
}

.rcw-verified { display: inline-flex; align-items: center; flex-shrink: 0; }
.rcw-verified svg { width: 16px; height: 16px; }

.rcw-stars { display: flex; gap: 2px; margin-bottom: 8px; }
.rcw-star  { width: 16px; height: 16px; }

.rcw-text {
  font-size: 13px;
  color: #333;
  line-height: 1.5;
  word-wrap: break-word;
  margin: 0;
}

/* =========================================================
   BOTÃO CARREGAR MAIS
   ========================================================= */
.rcw-load-more-wrap { text-align: center; margin-top: 32px; }

.rcw-load-more-btn {
  border: none;
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.3s;
}

.rcw-load-more-btn:hover { opacity: 0.85; }

/* =========================================================
   MODAL FRONTEND — estrutura com .rcw-modal__wrap
   ========================================================= */
.rcw-modal {
  position: fixed !important;
  top: 0 !important; left: 0 !important;
  right: 0 !important; bottom: 0 !important;
  z-index: 999999 !important;
  pointer-events: auto !important;
}

.rcw-modal__overlay {
  position: absolute !important;
  top: 0 !important; left: 0 !important;
  right: 0 !important; bottom: 0 !important;
  background: rgba(0,0,0,.55) !important;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.rcw-modal__wrap {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) scale(0.97) !important;
  width: min(560px, 94vw) !important;
  max-height: 88vh !important;
  background: #fff !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 48px rgba(0,0,0,.28) !important;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.rcw-modal__dialog {
  padding: 48px 28px 28px !important;
  overflow-y: auto !important;
  flex: 1 !important;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box !important;
}

.rcw-modal[aria-hidden="false"] .rcw-modal__overlay {
  opacity: 1 !important;
}

.rcw-modal[aria-hidden="false"] .rcw-modal__wrap {
  opacity: 1 !important;
  transform: translate(-50%, -50%) scale(1) !important;
}

.rcw-modal__close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: #888;
  z-index: 10;
  padding: 4px 8px;
  font-family: Arial, sans-serif;
}

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

.rcw-modal__title {
  font-size: 20px !important;
  font-weight: 700 !important;
  margin: 0 0 20px !important;
  padding: 0 !important;
  color: #111 !important;
  line-height: 1.3 !important;
}

/* =========================================================
   FORM DENTRO DO MODAL
   ========================================================= */
.rcw-form__group { margin-bottom: 16px; }

.rcw-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.rcw-input,
.rcw-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
  font-family: inherit;
  background: #fff;
  color: #333;
}

.rcw-textarea {
  resize: vertical;
  min-height: 100px;
}

.rcw-form__submit-wrap {
  text-align: center;
  margin-top: 20px;
}

.rcw-submit {
  padding: 12px 36px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  letter-spacing: .5px;
}

.rcw-success {
  text-align: center;
  margin-top: 14px;
  color: #28a745;
  font-size: 14px;
  font-weight: 600;
}

.rcw-error {
  text-align: center;
  margin-top: 10px;
  color: #dc3545;
  font-size: 14px;
  font-weight: 600;
}

/* =========================================================
   ESTRELAS DO FORM — usa CSS custom property herdada do wrapper
   ========================================================= */
.rcw-stars-input {
  display: flex;
  gap: 4px;
  align-items: center;
}

.rcw-star-btn {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  cursor: pointer !important;
  padding: 2px !important;
  margin: 0 !important;
  line-height: 0 !important;
  display: inline-block !important;
  transition: transform 0.15s ease !important;
  outline: none !important;
}

.rcw-star-btn svg {
  width: 28px !important;
  height: 28px !important;
  fill: #ddd !important;
  transition: fill 0.15s ease !important;
  display: block !important;
}

.rcw-star-btn:hover { transform: scale(1.2) !important; }

.rcw-star-btn:hover svg,
.rcw-star-btn.is-hover svg,
.rcw-star-btn.is-active svg {
  fill: var(--rcw-star-color, #000000) !important;
}

/* =========================================================
   WIDGET LATERAL
   ========================================================= */
#rcw-widget-root {
  --rcw-tab-bg:    #111111;
  --rcw-tab-color: #ffffff;
  --rcw-star-color: #000000;
}

/* Aba lateral (desktop) */
.rcw-widget-tab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: var(--rcw-tab-bg);
  color: var(--rcw-tab-color);
  border: none;
  border-radius: 8px 0 0 8px;
  padding: 14px 10px;
  cursor: pointer;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: -2px 0 12px rgba(0,0,0,.18);
  transition: padding 0.2s, box-shadow 0.2s;
}

.rcw-widget-tab:hover {
  padding-right: 16px;
  box-shadow: -4px 0 18px rgba(0,0,0,.25);
}

.rcw-widget-tab__label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
  white-space: nowrap;
  line-height: 1;
}

/* FAB (mobile) */
.rcw-widget-fab {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 52px;
  height: 52px;
  background: var(--rcw-tab-bg);
  color: var(--rcw-tab-color);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 99990;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.28);
  transition: transform 0.2s;
}

.rcw-widget-fab:hover { transform: scale(1.08); }

/* =========================================================
   MODAL DO WIDGET
   ========================================================= */
.rcw-widget-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999990 !important;
}

.rcw-widget-modal__overlay {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(0,0,0,.5) !important;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.rcw-widget-modal[aria-hidden="false"] .rcw-widget-modal__overlay { opacity: 1 !important; }

.rcw-widget-modal__panel {
  position: absolute !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: min(780px, 96vw) !important;
  background: #fff !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: -6px 0 32px rgba(0,0,0,.22) !important;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.rcw-widget-modal[aria-hidden="false"] .rcw-widget-modal__panel {
  transform: translateX(0) !important;
}

.rcw-widget-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.rcw-widget-modal__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: #111;
}

.rcw-widget-modal__close {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #888;
  line-height: 1;
  padding: 4px 8px;
}

.rcw-widget-modal__close:hover { color: #333; }

/* Filtros */
.rcw-widget-filters {
  display: flex;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.rcw-widget-select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  min-width: 150px;
  cursor: pointer;
}

/* Corpo scrollável */
.rcw-widget-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
}

.rcw-widget-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.rcw-widget-loading {
  text-align: center;
  padding: 40px 20px;
  color: #888;
  font-size: 14px;
}

.rcw-widget-empty {
  text-align: center;
  padding: 40px 20px;
  color: #888;
  font-size: 14px;
}

/* Footer com "carregar mais" */
.rcw-widget-modal__footer {
  padding: 14px 20px;
  border-top: 1px solid #f0f0f0;
  text-align: center;
  flex-shrink: 0;
}

.rcw-widget-load-more {
  background: #111;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.rcw-widget-load-more:hover { opacity: 0.82; }

/* =========================================================
   RESPONSIVO
   ========================================================= */
@media (max-width: 1200px) {
  .rcw-grid { grid-template-columns: repeat(3, 1fr); }
  .rcw-widget-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .rcw-header { flex-direction: column; align-items: flex-start !important; }
  .rcw-grid   { grid-template-columns: repeat(2, 1fr); gap: 16px; }

  /* Oculta aba, mostra FAB */
  .rcw-widget-tab { display: none; }
  .rcw-widget-fab { display: flex; }

  /* Painel ocupa largura total no mobile */
  .rcw-widget-modal__panel { width: 100% !important; }
  .rcw-widget-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

@media (max-width: 576px) {
  .rcw-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .rcw-widget-grid { grid-template-columns: 1fr; }
}
