/* ======================================================
   HEART RATE CALCULATOR – FINAL OP UI (FIXED)
====================================================== */

.tm-hr-calculator {
  max-width: 1000px;
  margin: 0 auto;
  color: #ffffff;
}

/* IMPORTANTE: evitar que el dropdown se recorte */
.tm-hr-form,
.tm-hr-field,
.tm-select {
  overflow: visible !important;
}

/* =========================
   FORM
========================= */
.tm-hr-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 32px;
}

.tm-hr-field {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tm-hr-field label {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
  text-transform: uppercase;
  text-align: center;
  color: #ffffff;
}

/* =========================
   INPUTS
========================= */
.tm-hr-field input {
  width: 100%;
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  color: #ffffff;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 16px;
  text-align: center;
}

.tm-hr-field input:focus {
  outline: none;
  border-color: #ff7a00;
}

/* =========================
   CUSTOM SELECT (FIX)
========================= */
.tm-select {
  position: relative;
  width: 100%;
  z-index: 50; /* base */
}

.tm-select-trigger {
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tm-select-trigger span {
  color: #fff;
}

.tm-select-arrow {
  width: 10px;
  height: 10px;
  border-right: 2px solid #ff7a00;
  border-bottom: 2px solid #ff7a00;
  transform: rotate(45deg);
}

/* cuando está abierto, subimos z-index para que no quede detrás */
.tm-select.open {
  z-index: 9999;
}

.tm-select-options {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  display: none;
  z-index: 99999; /* 🔥 encima de todo */
}

.tm-select.open .tm-select-options {
  display: block;
}

.tm-select-option {
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 700;
  color: #fff;
}

.tm-select-option:hover {
  background: #ff7a00;
  color: #000;
}

/* =========================
   BUTTON
========================= */
.tm-hr-actions {
  grid-column: span 3;
  display: flex;
  justify-content: center;
}

.tm-hr-btn {
  background: #ff7a00;
  color: #000;
  border: none;
  padding: 16px 42px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.6px;
  border-radius: 999px;
  cursor: pointer;
  text-transform: uppercase;
}

/* =========================
   RESULT TITLE
========================= */
.tm-hr-result h3 {
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 10px;
}

.tm-hr-result p {
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 14px;
}

/* =========================
   TABLE
========================= */
.tm-hr-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.tm-hr-table thead,
.tm-hr-table thead tr,
.tm-hr-table thead th {
  background: #0f0f0f !important;
}

.tm-hr-table thead th {
  color: #ffffff !important;
  font-weight: 900 !important;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 14px 12px;
  border-bottom: 1px solid #ffffff;
}

.tm-hr-table tbody tr {
  border-bottom: 1px solid #ffffff;
}

.tm-hr-table td {
  padding: 16px 12px;
}

/* =========================
   ZONE COLORS
========================= */
.tm-hr-table tr.zona1 td { color: #ffffff; }
.tm-hr-table tr.zona2 td { color: #d0d0d0; }
.tm-hr-table tr.zona3 td { color: #ff9b3f; font-weight: 900; }
.tm-hr-table tr.zona4 td { color: #ff7a00; }
.tm-hr-table tr.zona5 td { color: #ff3b3b; font-weight: 900; }

/* =========================
   NOTE
========================= */
.tm-hr-note {
  margin-top: 16px;
  font-size: 12px;
  color: #ffffff;
  text-align: center;
}

/* =========================
   RESPONSIVE (MOBILE) – FORZADO
   (Tu tema puede pisar grid, por eso !important)
========================= */
@media (max-width: 768px) {

  .tm-hr-form {
    grid-template-columns: 1fr !important; /* 🔥 UNA SOLA COLUMNA */
    gap: 14px !important;
  }

  .tm-hr-actions {
    grid-column: span 1 !important;
  }

  .tm-hr-btn {
    width: 100%;
  }
}
