/* Books2Go Formatos - Estilos centralizados */
:root {
  --b2g-verde: #96BD0D;
  --b2g-blanco: #FFFFFF;
  --b2g-azul: #0D3D82;
}

* {
  box-sizing: border-box;
}

body {
  font-family: Segoe UI, system-ui, sans-serif;
  margin: 0;
  padding: 20px;
  background: var(--b2g-blanco);
  color: var(--b2g-azul);
}

/* Portada: botones de selección */
.b2g-portada {
  max-width: 480px;
  margin: 2rem auto;
  text-align: center;
}

.b2g-portada h1 {
  color: var(--b2g-azul);
  margin-bottom: 2rem;
  font-size: 1.5rem;
}

.b2g-botones-formato {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.b2g-btn-formato {
  display: block;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--b2g-blanco);
  background: var(--b2g-azul);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.05s;
}

.b2g-btn-formato:hover {
  background: var(--b2g-verde);
  color: var(--b2g-blanco);
}

.b2g-btn-formato:active {
  transform: scale(0.98);
}

/* Modal */
.b2g-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13, 61, 130, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.b2g-modal-overlay.activo {
  display: flex;
}

.b2g-modal {
  background: var(--b2g-blanco);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.b2g-modal-cabecera {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--b2g-azul);
  color: var(--b2g-blanco);
  border-radius: 12px 12px 0 0;
}

.b2g-modal-cabecera h2 {
  margin: 0;
  font-size: 1.25rem;
}

.b2g-modal-cabecera-derecha {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.b2g-modal-cabecera-derecha img {
  height: 40px;
  width: auto;
}

.b2g-modal-cerrar {
  flex-shrink: 0;
}

.b2g-btn-cerrar {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid var(--b2g-blanco);
  color: var(--b2g-blanco);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.b2g-btn-cerrar:hover {
  background: rgba(255, 255, 255, 0.35);
}

.b2g-modal-cuerpo {
  padding: 1.25rem;
}

.b2g-seccion {
  margin-bottom: 1.5rem;
}

.b2g-seccion h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  color: var(--b2g-azul);
  border-bottom: 2px solid var(--b2g-verde);
  padding-bottom: 0.25rem;
}

.b2g-form-grupo {
  margin-bottom: 0.75rem;
}

.b2g-form-grupo label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: var(--b2g-azul);
}

.b2g-form-grupo input,
.b2g-form-grupo textarea {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

.b2g-form-grupo input:focus,
.b2g-form-grupo textarea:focus {
  outline: none;
  border-color: var(--b2g-verde);
  box-shadow: 0 0 0 2px rgba(150, 189, 13, 0.25);
}

.b2g-form-grupo textarea {
  min-height: 80px;
  resize: vertical;
}

.b2g-nota {
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.2rem;
}

.b2g-leyenda {
  font-size: 0.85rem;
  color: var(--b2g-azul);
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: #f0f4f8;
  border-radius: 6px;
  border-left: 4px solid var(--b2g-verde);
}

.b2g-captcha-envio {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.b2g-captcha-envio .g-recaptcha {
  margin-bottom: 1rem;
}

.b2g-btn-enviar {
  padding: 0.65rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--b2g-blanco);
  background: var(--b2g-verde);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.b2g-btn-enviar:hover {
  background: var(--b2g-azul);
}

.b2g-btn-enviar:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.b2g-msg {
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: none;
}

.b2g-msg.activo {
  display: block;
}

.b2g-msg.exito {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.b2g-msg.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.b2g-folio {
  font-weight: 600;
  font-size: 1.05rem;
}
