﻿/*───────────────────────────────────────────────
 🎨 STYLES.CSS — Proyecto Comecocos / Generador
───────────────────────────────────────────────*/

/*───────────────────────────────────────────────
 🧩 General / Sistema
───────────────────────────────────────────────*/
[translate="no"] {
  unicode-bidi: isolate;
  -webkit-user-modify: read-only;
}

/*───────────────────────────────────────────────
 🅰️ Fuentes locales
───────────────────────────────────────────────*/
@font-face {
  font-family: 'Pixel Operator Mono';
  src: url('fonts/PixelOperatorMono.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Press Start 2P';
  src: url('fonts/PressStart2P-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Comecocos';
  src: url('fonts/Comecocos-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/*───────────────────────────────────────────────
 🧍‍♂️ Body general
───────────────────────────────────────────────*/
body {
  background-color: #f1f1e9;
  color: #ecf0f1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  margin: 0;
  font-family: Arial, sans-serif;
}

/* Cuando hay un cursor personalizado (glifo seleccionado) */
body.cursor-custom #map-container,
body.cursor-custom #map-container .cell {
  cursor: inherit !important; /* Hereda el cursor SVG del body */
}

/*───────────────────────────────────────────────
 🗺️ Contenedor del mapa
───────────────────────────────────────────────*/
#map-container {
  margin: 20px;
  position: relative;
  display: inline-block;
}

#map-container,
#map-container .cell {
  cursor: pointer;
  user-select: none;
}

/*───────────────────────────────────────────────
 🧭 Controles
───────────────────────────────────────────────*/
#controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0px 40px 20px;
  padding: 16px;
  background-color: #f7f7f2;
  border-radius: 4px;
  width: 90%;
  max-width: 460px;
  border: 3px solid white;
}

/* Filas de inputs */
.input-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 10px;
}

/* Variantes de filas */
.input-row.selectors,
.input-row.quantities,
.input-row.symmetries,
.input-row.typography-selectors {
  justify-content: space-evenly;
}

.input-row.selectors {
  margin-top: 10px;
}

.input-row.symmetries {
  margin-bottom: 20px;
  width: 90%;
}

/* Etiquetas y spans */
.input-row label,
.input-row span {
  font-family: "Press Start 2P", system-ui;
  color: #444;
  font-size: 16px;
}

/* Campos numéricos */
.input-row input[type="number"] {
  width: 32px;
  text-align: center;
  border: none;
  background: none;
  color: #444;
  font-family: "Press Start 2P", system-ui;
  font-size: 16px;
}

.input-row input[type="number"]::-webkit-inner-spin-button,
.input-row input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.input-row input[type="number"]:focus {
  outline: none;
}

/* Agrupaciones */
.input-container {
  display: flex;
  flex-direction: column;
  width: 90%;
}

.input-column {
  display: flex;
  flex-direction: column;
}

.input-group {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.input-group label {
  margin-right: 10px;
}

/*───────────────────────────────────────────────
 🔘 Botones
───────────────────────────────────────────────*/
.button-container {
  display: flex;
  justify-content: space-evenly;
  width: 100%;
}
/*
#generateButton,
#recipesButton,
#shareButton,
#copyButton {
  padding: 8px 8px 6px 10px;
  background-color: #e2d7ca;
  border: 3px solid #e2d7ca;
  border-radius: 5px;
  color: #444;
  cursor: pointer;
  font-family: 'Press Start 2P', cursive;
  font-size: 16px;
}

#generateButton:hover,
#recipesButton:hover,
#shareButton:hover,
#copyButton:hover {
  border-color: #444;
}

#recipesButton,
#shareButton {
  margin-left: 10px;
} */
/*───────────────────────────────────────────────
 🔘 Botones principales unificados
───────────────────────────────────────────────*/
.main-button {
  padding: 8px 8px 6px 10px;
  background-color: #e2d7ca;
  border: 3px solid #e2d7ca;
  border-radius: 5px;
  color: #444;
  cursor: pointer;
  font-family: 'Press Start 2P', cursive;
  font-size: 16px;
  transition: border-color 0.2s ease;
  margin-left: 10px;
}

.main-button:hover {
  border-color: #444;
}

.main-button.muted {
  opacity: 0.6;
  filter: grayscale(60%);
}



/*───────────────────────────────────────────────
 🌀 Laberinto
───────────────────────────────────────────────*/
.labyrinth {
  display: grid;
}

.labyrinth.comecocos {
  background-color: #f7f7f2;
  padding: 6px;
  border-radius: 14px;
  border: 2px solid white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.labyrinth.comecocos .cell {
  font-family: 'Comecocos', sans-serif;
  font-size: 14px;
  text-align: center;
}

/*───────────────────────────────────────────────
 🔳 Celdas
───────────────────────────────────────────────*/
.grid-template-columns {
  background-color: #f7f7f2;
  padding: 10px;
  margin: 10px;
  border-radius: 14px;
  border: 3px solid white;
}

.cell {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444;
  transition: background-color 0.2s, opacity 0.4s ease;
}

.cell:hover,
.cell.hovered {
  background-color: #e2d7ca;
}

/*───────────────────────────────────────────────
 🕹️ Estilo general Comecocos
───────────────────────────────────────────────*/
.comecocos {
  font-family: 'Comecocos', sans-serif;
  background-color: #f7f7f2;
  padding: 10px;
}

/*───────────────────────────────────────────────
 🔠 Selectores de glifos
───────────────────────────────────────────────*/
.selector {
  background-color: #fff;
  color: #444;
  border: 2px solid #444;
  border-radius: 5px;
  cursor: pointer;
  padding: 5px 5px 1px;
  font-size: 20px;
  font-family: 'Comecocos', sans-serif;
}

.selector:hover {
  outline: 1px solid #444;
}

.selected {
  background-color: #fff69e;
  color: #444;
}

.input-row.orientation-and-generate .selector {
  font-family: 'Comecocos', sans-serif;
  font-size: 20px;
  margin-right: 10px;
}

/*───────────────────────────────────────────────
 ✍️ Text Overlay (superposición de texto)
───────────────────────────────────────────────*/
#text-overlay,
#bottom-text-overlay {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px;
  border-radius: 3px;
  z-index: 10;
  color: #444;
  font-size: 14px;
  white-space: pre;
}

/* Tipografías del overlay */
.font-pixel-operator-mono {
  font-family: 'Pixel Operator Mono', sans-serif;
  padding: 2px 8px 2px 11px;
}

.font-press-start-2p {
  font-family: 'Press Start 2P', sans-serif;
  padding: 7px 5px 5px 7px;
}

/* Inputs de overlay */
#overlayInput,
#bottomOverlayInput {
  font-family: 'Press Start 2P', sans-serif;
  font-size: 16px;
  padding: 7px;
  border: 3px solid #fff;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 0 5px #00000012;
  margin-left: 15px;
}

/* Oculto */
.hidden {
  display: none;
}

/*───────────────────────────────────────────────
 📜 Ventana flotante de recetas
───────────────────────────────────────────────*/
.recipes-modal {
  display: none;
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.recipes-content {
  background-color: #f7f7f2;
  border: 3px solid #444;
  border-radius: 10px;
  padding: 20px 30px;
  color: #444;
  text-align: center;
  font-size: 18px;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Título clásico */
.recipes-content h3 {
  margin-top: 0;
  font-family: 'Press Start 2P', sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
  color: #222;
}

/* Lista de recetas */
.recipes-list {
  margin-top: 10px;
  line-height: 1.8;
  font-family: 'Comecocos', sans-serif;
  font-size: 20px;
  color: #333;
}

.recipes-list pre {
  font-family: 'Comecocos', sans-serif;
  font-size: 18px;
  line-height: 1;
  color: #333;
  background: none;
  border: none;
  padding: 0;
  margin: 0 auto;
  display: inline-block;
  text-align: left;
}

/* Botón de cierre */
.close-recipes {
  position: absolute;
  top: 8px;
  right: 14px;
  cursor: pointer;
  font-size: 18px;
  color: #444;
}

/*───────────────────────────────────────────────
 🧱 Estructura principal del proyecto
───────────────────────────────────────────────*/
#project-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;     /* Centra horizontalmente */
  justify-content: center; /* Centra verticalmente */
  background-color: #f1f1e9;
  padding: 0px 20px 0px;
}

/* ────────────────────────────────────────────────
 🔴 Modo Comunismo (colores + transiciones)
──────────────────────────────────────────────── */
.labyrinth.comecocos {
  transition: background-color 1s ease;
}

.cell,
#text-overlay,
#bottom-text-overlay {
  transition: color 1s ease;
}

/* Estado Comunismo */
.labyrinth.comecocos.comunismo {
  background-color: #ed4139 !important; /* rojo */
}

.labyrinth.comecocos.comunismo .cell {
  color: #ffdc99 !important; /* amarillo para las celdas */
}

.labyrinth.comecocos.comunismo .cell:hover,
.labyrinth.comecocos.comunismo .cell.hovered {
  background-color: #f46b3f !important; /* color intermedio naranja */
  transition: background-color 0.4s ease;
}

#text-overlay.comunismo,
#bottom-text-overlay.comunismo {
  color: #ffdc99 !important;
}

/* Ocultar los botones de orientación */
#orientationVertical,
#orientationHorizontal {
  display: none !important;
}

