/* TV PLAY V1.83 — Países: desplegable personalizado hacia abajo.
   El <select> nativo sigue siendo la única fuente de valores y precios.
   Diseño progresivo: sin JavaScript se conserva el selector original. */

/* Bajada del título: misma redacción, un poco más grande y más separada. */
#planes .section-top.centered p,
#planes:has(.duration-button.active:not([data-months="1"])) .section-top.centered p {
  margin-top: 21px;
  font-size: 16px;
  line-height: 1.46;
}
@media (min-width: 861px) and (max-height: 835px) {
  #planes .section-top.centered p,
  #planes:has(.duration-button.active:not([data-months="1"])) .section-top.centered p {
    margin-top: 16px;
    font-size: 15.1px;
    line-height: 1.42;
  }
}
@media (min-width: 601px) and (max-width: 860px) {
  #planes .section-top.centered p {
    margin-top: 23px;
    font-size: 15.5px;
    line-height: 1.48;
  }
}
@media (max-width: 600px) {
  #planes .section-top.centered p {
    margin-top: 22px;
    font-size: 14.4px;
    line-height: 1.52;
  }
}

/* El control visible replica exactamente el ancho del selector original,
   que coincide con el botón 5. */
#planes .plan-country-ui {
  position: relative;
  isolation: isolate;
  width: 90%;
  max-width: 555px;
  margin-top: 13px;
}
#planes .plan-country-ui.is-open { z-index: 250; }
#planes .plan-country-ui #planCountry[hidden] { display: none !important; }

#planes .plan-country-ui-trigger {
  width: 100%;
  min-height: 54px;
  border: 1px solid rgba(84, 133, 183, .64);
  border-radius: 13px;
  background: #102540;
  color: #f7fbff;
  padding: 0 18px 0 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  appearance: none;
  font: inherit;
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
#planes .plan-country-ui-trigger:hover {
  border-color: #64b7ed;
  background: #153050;
}
#planes .plan-country-ui-trigger[aria-expanded="true"] {
  border-color: #48bdff;
  background: #162f51;
  box-shadow: 0 0 0 2px rgba(72, 171, 245, .11);
}
#planes .plan-country-ui-trigger:focus-visible {
  outline: 3px solid #52dff0;
  outline-offset: 3px;
}
#planes .plan-country-ui-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#planes .plan-country-ui-chevron {
  height: 19px;
  width: 19px;
  flex: 0 0 19px;
  color: #d6edff;
  transition: transform 180ms ease;
}
#planes .plan-country-ui-trigger[aria-expanded="true"] .plan-country-ui-chevron {
  transform: rotate(180deg);
}

/* Posición: el menú siempre se coloca DEBAJO del selector. */
#planes .plan-country-ui-menu {
  position: absolute;
  top: calc(100% + 9px);
  left: 0;
  right: 0;
  z-index: 251;
  max-height: 328px;
  padding: 9px;
  border: 1px solid rgba(84, 154, 220, .62);
  border-radius: 15px;
  background: linear-gradient(180deg, #163454 0%, #112642 100%);
  box-shadow: 0 20px 45px rgba(0, 7, 22, .47), inset 0 1px 0 rgba(208, 240, 255, .09);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#planes .plan-country-ui-menu[hidden] { display: none !important; }
#planes .plan-country-ui-search-wrap {
  height: 43px;
  flex: 0 0 43px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  margin-bottom: 8px;
  border: 1px solid rgba(96, 153, 204, .35);
  border-radius: 10px;
  background: rgba(4, 20, 41, .47);
}
#planes .plan-country-ui-search-icon {
  width: 17px;
  height: 17px;
  color: #8db8da;
  flex: 0 0 17px;
}
#planes .plan-country-ui-search {
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f4fbff;
  font: inherit;
  font-size: 14.5px;
  padding: 0;
}
#planes .plan-country-ui-search::placeholder { color: #abc7df; opacity: .9; }
#planes .plan-country-ui-search::-webkit-search-cancel-button { cursor: pointer; }
#planes .plan-country-ui-search-wrap:focus-within {
  border-color: #62caff;
  box-shadow: 0 0 0 2px rgba(59, 170, 236, .12);
}
#planes .plan-country-ui-options {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 3px 1px 0;
  scrollbar-width: thin;
  scrollbar-color: #577c9e transparent;
}
#planes .plan-country-ui-options::-webkit-scrollbar { width: 7px; }
#planes .plan-country-ui-options::-webkit-scrollbar-track { background: transparent; }
#planes .plan-country-ui-options::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: #557d9f;
}
#planes .plan-country-ui-option {
  width: 100%;
  min-height: 45px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: none;
  border-radius: 10px;
  padding: 8px 11px;
  margin: 0 0 2px;
  cursor: pointer;
  color: #e9f5ff;
  font: inherit;
  font-size: 15px;
  font-weight: 550;
  line-height: 1.24;
  text-align: left;
  background: transparent;
}
#planes .plan-country-ui-option:hover,
#planes .plan-country-ui-option:focus-visible {
  background: rgba(87, 171, 241, .15);
  color: white;
  outline: none;
}
#planes .plan-country-ui-option:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(103, 205, 255, .72);
}
#planes .plan-country-ui-option[aria-selected="true"] {
  background: rgba(54, 121, 205, .27);
  color: #fff;
  font-weight: 710;
}
#planes .plan-country-ui-option[hidden] { display: none !important; }
#planes .plan-country-ui-name {
  flex: 1;
  min-width: 0;
}
#planes .plan-country-ui-check {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: #5ce0ec;
  opacity: 0;
}
#planes .plan-country-ui-option[aria-selected="true"] .plan-country-ui-check { opacity: 1; }
#planes .plan-country-ui-flag {
  width: 23px;
  height: 17px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(236, 246, 255, .24);
  flex: 0 0 23px;
}
#planes .plan-country-ui-globe {
  height: 20px;
  width: 23px;
  flex: 0 0 23px;
  color: #81c7ec;
}
#planes .plan-country-ui-empty {
  padding: 20px 12px 24px;
  text-align: center;
  font-size: 14px;
  color: #b9d7ec;
  line-height: 1.45;
}
#planes .plan-country-ui-empty[hidden] { display: none !important; }

/* Respetar el tamaño compacto de selector en notebooks. */
@media (min-width: 861px) and (max-height: 835px) {
  #planes .plan-country-ui { margin-top: 9px; }
  #planes .plan-country-ui-trigger {
    min-height: 48px;
    font-size: 16.8px;
  }
}
@media (min-width: 601px) and (max-width: 860px) {
  #planes .plan-country-ui { width: 90%; max-width: 575px; }
}
@media (max-width: 600px) {
  #planes .plan-country-ui { width: 100%; max-width: none; }
  #planes .plan-country-ui-trigger {
    font-size: 17px;
    padding-left: 15px;
    padding-right: 14px;
  }
  #planes .plan-country-ui-option { min-height: 46px; font-size: 15.5px; }
}
@media (prefers-reduced-motion: reduce) {
  #planes .plan-country-ui-trigger,
  #planes .plan-country-ui-chevron {
    transition: none;
  }
}
