/* =========================================================
   AISLAR TODAS LAS CALCULADORAS DEL CSS GLOBAL
========================================================= */
.calc-container * {
  all: revert;
  box-sizing: border-box;
  font-family: inherit;
}

/* =========================================================
   WRAPPER PRINCIPAL
========================================================= */
.calc-container .calc-wrapper {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 20px;
  background: #0f0f0f;
  border-radius: 14px;
  border: 1px solid #222;
  box-shadow: 0 0 25px rgba(0,0,0,0.4);
  color: #fff;
  position: relative;
}

/* Logo */
.calc-container .calc-logo {
  position: absolute;
  top: 12px;
  left: 12px;
  height: 40px;
  border-radius: 6px;
}

/* Título */
.calc-container .calc-wrapper h2 {
  text-align: center;
  margin-top: 60px;
  margin-bottom: 18px;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

/* =========================================================
   GRID
========================================================= */
.calc-container .calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

/* =========================================================
   TARJETAS
========================================================= */
.calc-container .calc-card {
  background: #1a1a1a;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #333;
}

.calc-container .calc-card h3 {
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: #ccc;
}

.calc-container .calc-card input,
.calc-container .calc-card select {
  width: 100%;
  padding: 9px;
  background: #111;
  border: 1px solid #333;
  border-radius: 6px;
  color: #fff;
  font-size: 0.9rem;
}

/* =========================================================
   BOTONES
========================================================= */
.calc-container .calc-full {
  grid-column: 1 / -1;
}

.calc-container .calc-full button {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #ff0000, #b30000);
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: 0.2s ease-in-out;
  letter-spacing: 0.5px;
  box-shadow: 0 0 12px rgba(255,0,0,0.4);
}

.calc-container .calc-full button:hover {
  background: linear-gradient(135deg, #ff1a1a, #cc0000);
  transform: translateY(-2px);
}

/* Botones alineados */
.calc-container .botones-container {
  display: flex;
  gap: 12px;
  width: 100%;
}

.calc-container .botones-container button {
  flex: 1;
  white-space: nowrap;
}

/* =========================================================
   RESULTADOS
========================================================= */
.calc-container .calc-result {
  grid-column: 1 / -1;
  background: #111;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid #333;
  max-height: 260px;
  overflow-y: auto;
}

.calc-container .calc-result h3 {
  margin-bottom: 8px;
  color: #fff;
  font-size: 1rem;
}

.calc-container .calc-result li {
  padding: 6px 0;
  border-bottom: 1px solid #222;
  font-size: 0.85rem;
  line-height: 1.2rem;
}

/* =========================================================
   BOTÓN CERRAR
========================================================= */
.calc-container .modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #d40000;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  z-index: 9999;
}

.calc-container .modal-close:hover {
  background: #ff1a1a;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 480px) {
  .calc-container .calc-wrapper {
    padding: 16px;
    max-width: 95%;
  }

  .calc-container .calc-wrapper h2 {
    font-size: 1.1rem;
    margin-top: 70px;
  }

  .calc-container .calc-logo {
    height: 34px;
  }

  .calc-container .calc-result {
    max-height: 220px;
  }
}

@media (max-width: 420px) {
  .calc-container .calc-wrapper {
    transform: scale(0.92);
    transform-origin: top center;
  }
}/* ============================================
   FIX PARA QUE LOS BOTONES NO SE SALGAN EN MÓVILES
============================================ */

.calc-container .botones-container {
  display: flex;
  gap: 12px;
  width: 100%;
  overflow: hidden;
}

.calc-container .botones-container button {
  flex: 1 1 0;
  min-width: 0; /* ← CLAVE: permite que el botón se ajuste */
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  padding: 12px;
}

/* Ajuste especial para móviles */
@media (max-width: 480px) {
  .calc-container .botones-container button {
    font-size: 0.85rem; /* reduce un poco el texto */
    padding: 10px;
  }
}
/* FIX universal para que TODOS los SVG se vean */
.calc-menu a svg,
.dropdown-menu a svg {
  width: 20px;
  height: 20px;
  fill: currentColor !important;
  stroke: none !important;
}


