/* ══════════════════════════════════════
   API Review — Royal Airport Concierge
   Styles adapted from original Elementor implementation
   ══════════════════════════════════════ */

:root {
  /* Brand-aligned palette (from original) */
  --brand: #0b64d6;
  --brand-hover: #094fa9;
  --text: #1c2530;
  --foreground: #1c2530;
  --muted: #4a5565;
  --muted-light: #8a94a6;
  --bg: #f7fafc;
  --card: #ffffff;
  --border: #e3e8ef;
  --chip: #f1f5f9;
  --chip-border: #e5eaf1;
  --shadow: 0 6px 18px rgba(17, 24, 39, .06);
  --footer: #0a3c7b;
  --success: #10b981;
  --success-bg: #d1fae5;
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  --accent: #DC2626; /* Color rojo aplicado a las estrellas y botones */
}

/* ── Reset inside wrapper ── */
.api-review-wrapper,
.api-review-wrapper * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.api-review-wrapper {
  font-family: 'Inter', system-ui, Segoe UI, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Container ── */
.api-review-wrapper .container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 16px;
}

/* ── Header ── */
.api-review-wrapper .rac-header {
  background: transparent; /* Fondo transparente */
  border-bottom: none; /* Quitamos la línea divisoria */
  box-shadow: none; /* Quitamos la sombra */
  padding: 20px 0;
  text-align: center;
}

.api-review-wrapper .rac-logo {
  font-weight: 700;
  font-size: 28px; /* Título más grande */
  color: #000000; /* Texto negro en lugar de azul */
  margin: 0;
}

.api-review-wrapper .rac-small {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

/* ── Card ── */
.api-review-wrapper .card {
  background: var(--card);
  border: none; /* Quitamos el borde normal */
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 32px 24px;
  margin: 24px 0;
  text-align: center;
  position: relative;
  overflow: hidden; /* Para que la línea se adapte a las esquinas si es necesario */
}

/* Agregar la línea roja y azul en la parte superior */
.api-review-wrapper .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  /* Gradiente suave de izquierda (rojo) a derecha (azul) */
  background: linear-gradient(90deg, #DC2626, #0b64d6);
}

/* ── Fade-in Animation ── */
.api-review-wrapper .fade-in {
  animation: rac-fadeIn 0.3s ease;
}

@keyframes rac-fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Title ── */
.api-review-wrapper .title {
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 24px;
  color: var(--text);
}

/* ── Reservation tag ── */
.api-review-wrapper .reservation-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--chip);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--brand);
  margin-bottom: 20px;
  border: 1px solid var(--chip-border);
}

/* ── Checkbox row ── */
.api-review-wrapper .checkbox-row {
  display: flex;
  align-items: center; /* Centrado vertical */
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  background: #f3f4f6; /* Gris muy claro */
  border-radius: 8px;
  border: none; /* Sin borde rojo */
  text-align: left;
}

.api-review-wrapper .checkbox-label {
  font-size: 15px;
  color: #1f2937; /* Texto gris oscuro/negro */
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  line-height: 1.4;
  margin: 0;
}

.api-review-wrapper .checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #dc2626; /* Esta línea cambia el color de selección */
}

/* ── Stars ── */
.api-review-wrapper .stars {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 32px 0;
}

.api-review-wrapper .star {
  font-size: 56px;
  color: #d1d5db;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  line-height: 1;
}

.api-review-wrapper .star:hover {
  transform: scale(1.15);
  color: #DC2626; /* Rojo al pasar el mouse */
}

.api-review-wrapper .star.selected {
  color: var(--accent) !important;
}

.api-review-wrapper .star-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 8px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  margin-bottom: 20px;
}

/* ── Mini stars (step 2) ── */
.api-review-wrapper .mini-stars {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column; /* Apila las estrellas y el botón verticalmente */
  gap: 12px; /* Espacio entre estrellas y botón */
  padding: 20px 16px;
  background: #f3f4f6; /* Fondo gris claro */
  border-radius: 8px;
  margin-bottom: 24px;
  border: none;
}

.api-review-wrapper .mini-stars .star {
  font-size: 24px;
  cursor: pointer; /* Cambia el cursor para que parezca clickeable */
  transition: color 0.2s ease;
}

/* El !important es necesario para sobrescribir el rojo de la clase .selected */
/* Aplicar el hover amarillo SOLO si la estrella NO está seleccionada */
.api-review-wrapper .mini-stars .star:not(.selected):hover {
  color: var(--warning) !important; 
}

/* ── Labels ── */
.api-review-wrapper .rac-label {
  display: block;
  text-align: left;
  font-size: 14px;
  color: var(--muted);
  margin: 20px 0 8px;
  font-weight: 500;
}

/* ── Textarea ── */
.api-review-wrapper textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.api-review-wrapper textarea:hover,
.api-review-wrapper textarea:focus {
  outline: none;
  border-color: var(--accent); /* Color rojo */
  border-style: dotted; /* Cambia la línea sólida a puntos */
  border-width: 1px; /* Mantiene el grosor */
  box-shadow: none; /* Quitamos la sombra para que se vean solo los puntos */
}

.api-review-wrapper textarea::placeholder {
  color: #8a94a6;
}

/* ── Input ── */
.api-review-wrapper input[type="email"] {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.2s ease;
  margin-bottom: 8px;
}

.api-review-wrapper input[type="email"]:hover,
.api-review-wrapper input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  border-style: dotted; /* Cambia la línea sólida a puntos */
  border-width: 1px;
  box-shadow: none;
}

.api-review-wrapper input[type="email"]::placeholder {
  color: #8a94a6;
}

/* ── Buttons ── */
.api-review-wrapper .controls {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  justify-content: flex-start; /* Alinea los botones a la izquierda */
}

.api-review-wrapper .btn {
  width: auto; /* Quita el 100% de ancho */
  padding: 8px 20px; /* Padding más compacto como en la imagen */
  border-radius: 6px; /* Bordes un poco más cerrados */
  border: 0;
  font-weight: 500;
  font-size: 14px; /* Tamaño de fuente reducido */
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.4;
}

.api-review-wrapper .btn-primary {
  background: var(--accent); /* Cambia el fondo a rojo */
  color: #fff;
  flex: none;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4); /* Añade la sombra roja difuminada */
  border: none;
}

.api-review-wrapper .btn-primary:hover {
  background: #b91c1c; /* Un rojo un poco más oscuro al pasar el cursor */
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.5); /* Aumenta un poco la sombra al hacer hover */
}

.api-review-wrapper .btn-outline {
  background: #ffffff; 
  border: 1px solid var(--border);
  color: var(--muted); /* Texto gris */
  flex: none;
}

.api-review-wrapper .btn-outline:hover {
  background: var(--chip);
  color: var(--text); /* Texto más oscuro al hacer hover */
}

.api-review-wrapper .btn-ghost {
  background: #ffffff;
  border: 1px solid var(--border); /* Borde gris claro */
  color: var(--muted); /* Texto en tono gris-azulado */
  font-size: 14px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: auto;
}

.api-review-wrapper .btn-ghost:hover {
  background: var(--chip); /* Fondo ligeramente gris al pasar el mouse */
  color: var(--text); /* Texto más oscuro */
  text-decoration: none;
}

.api-review-wrapper .btn-blue {
  background: var(--brand);
  color: #fff !important;
  border: none;
}

.api-review-wrapper .btn-blue:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(11, 100, 214, 0.3);
}

.api-review-wrapper .btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 100%;
}

.api-review-wrapper .btn-secondary:hover {
  background: var(--chip);
}

/* ── Loading ── */
.api-review-wrapper .loading {
  text-align: center;
  padding: 40px 0;
}

.api-review-wrapper .loading-svg {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.api-review-wrapper .loading-svg svg {
  animation: rac-spin 0.8s linear infinite;
}

@keyframes rac-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ── Success area ── */
.api-review-wrapper .success {
  text-align: center;
  padding: 20px 0;
}

.api-review-wrapper .check-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  animation: rac-fadeIn 0.4s ease;
}

.api-review-wrapper .celebration {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
  animation: rac-bounce 0.6s ease;
}

@keyframes rac-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ── Fixed success message ── */
#global-fixed-success-message {
  position: relative;
  margin-top: 20px;
}

#fixed-success-message {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--success-bg);
  border: 1px solid var(--success);
  border-radius: 10px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  text-align: left;
}

#fixed-success-message.visible {
  opacity: 1;
  transform: translateY(0);
}

#fixed-success-message .success-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}

#fixed-success-message .success-content {
  font-size: 14px;
  color: #065f46;
  line-height: 1.6;
}

#fixed-success-message .success-content strong {
  display: block;
  margin-bottom: 2px;
}

/* ── Muted note ── */
.api-review-wrapper .muted-note {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* ── Footer ── */
.api-review-wrapper .api-review-footer {
  text-align: center;
  padding: 24px 0;
  font-size: 13px;
  color: var(--muted);
}

/* ── Utility ── */
.api-review-wrapper .hidden {
  display: none !important;
}

/* ── reCAPTCHA ── */
.api-review-wrapper .g-recaptcha {
  margin-top: 5%;
}

/* ── Step 2 transition ── */
.api-review-wrapper .step2.active {
  animation: rac-fadeIn 0.3s ease;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .api-review-wrapper .container {
    padding: 16px 12px;
  }

  .api-review-wrapper .card {
    padding: 24px 16px;
    margin: 16px 0;
  }

  .api-review-wrapper .star {
    font-size: 48px;
  }

  .api-review-wrapper .stars {
    gap: 8px;
  }

  .api-review-wrapper .rac-logo {
    font-size: 18px;
  }

  .api-review-wrapper .title {
    font-size: 18px;
  }

  .api-review-wrapper .controls {
    flex-direction: column;
  }

  .api-review-wrapper .g-recaptcha {
    transform: scale(0.85);
    transform-origin: 0 0;
  }

  .api-review-wrapper .star-labels span {
    font-size: 11px;
  }
}


/* ══════════════════════════════════════
   NUEVOS ESTILOS PARA LA PANTALLA DE ÉXITO 
   ══════════════════════════════════════ */

/* 1. Icono del Check (Círculo rojo con check rojo) */
.api-review-wrapper .check-icon {
  width: 72px !important;
  height: 72px !important;
  background: #ffffff !important; /* Fondo blanco */
  border: 4px solid var(--accent) !important; /* Borde rojo usando tu variable */
  color: var(--accent) !important; /* Check rojo */
  font-size: 36px !important;
  font-weight: bold !important;
}

/* 2. Título "Thank You!" (Azul oscuro y más grande) */
.api-review-wrapper #successTitle {
  color: #242157 !important; /* Azul oscuro corporativo */
  font-size: 32px !important;
  font-weight: 700 !important;
  margin-bottom: 8px !important;
}

/* 3. Subtítulo gris */
.api-review-wrapper #successMessage {
  font-size: 16px !important;
  color: #8a94a6 !important;
  margin-bottom: 30px !important;
}

/* 4. Emoji del cono de fiesta */
.api-review-wrapper .celebration {
  font-size: 64px !important; /* Más grande */
  display: block;
  margin-bottom: 24px !important;
}

/* 5. Texto de la invitación a Google */
.api-review-wrapper #highRatingSuccess p {
  font-size: 16px !important;
  color: #1c2530 !important;
  margin: 0 0 24px 0 !important;
}

/* 6. Botón de "Leave a Google Review" (Rojo en lugar de azul) */
.api-review-wrapper #highRatingSuccess .btn-blue {
  background-color: var(--accent) !important; /* Rojo */
  color: #ffffff !important;
  border-radius: 8px !important;
  padding: 14px 24px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}

.api-review-wrapper #highRatingSuccess .btn-blue:hover {
  background-color: #b91c1c !important; /* Rojo más oscuro al pasar el mouse */
}

/* 7. Botón de "No, thanks" */
.api-review-wrapper #highRatingSuccess .btn-secondary {
  background-color: #ffffff !important;
  color: #1c2530 !important;
  border: 1px solid #e3e8ef !important;
  border-radius: 8px !important;
  padding: 14px 24px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}

.api-review-wrapper #highRatingSuccess .btn-secondary:hover {
  background-color: #f7fafc !important;
}

/* ══════════════════════════════════════
   ESTILOS PARA LA CAJA DE "FEEDBACK RECIBIDO"
   ══════════════════════════════════════ */

/* Sobrescribir la caja verde por la caja blanca con borde y sombra */
.api-review-wrapper #fixed-success-message {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04) !important;
  border-radius: 12px !important;
  padding: 24px 20px !important;
  display: flex !important;
  align-items: center !important;
  position: relative !important;
  margin: 24px 0 !important;
}

/* Icono circular negro con check blanco alineado a la izquierda */
.api-review-wrapper #fixed-success-message .success-icon {
  background: #000000 !important;
  color: #ffffff !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  font-size: 14px !important;
  position: absolute !important;
  left: 20px !important;
}

/* Contenedor del texto (centrado visualmente) */
.api-review-wrapper #fixed-success-message .success-content {
  flex: 1 !important;
  text-align: center !important;
  color: #1c2530 !important;
  padding: 0 40px !important; /* Evita que el texto choque con el icono en móviles */
}

/* Título dentro de la caja "Feedback submitted successfully!" */
.api-review-wrapper #fixed-success-message .success-content strong {
  color: #000000 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  margin-bottom: 6px !important;
  display: block !important;
}

/* Texto final inferior (agradecimiento y revisión del equipo) */
.api-review-wrapper #complaintSuccess p {
  color: #1f2937 !important;
  font-size: 16px !important;
  line-height: 1.5 !important;
  margin-top: 16px !important;
}