/* Mapa de prestadores (/mapa-de-prestadores): company picker, map + list, provider modal.
   Same look as the quote results page (planes.css). */

.mapa-prest {
  background: #f5f7f8;
  color: #2c2c2c;
}

/* now-ui-dashboard gives .wrapper height:100vh, which cuts the background off */
.wrapper.mapa-prest {
  height: auto;
  min-height: 100vh;
  /* footer at the bottom of the window even when the content is short */
  display: flex;
  flex-direction: column;
}

.wrapper.mapa-prest > .mp-section {
  flex: 1 0 auto;
}

.wrapper.mapa-prest > .footer {
  flex-shrink: 0;
}

.mapa-prest select {
  text-align: left;
  text-align-last: left;
}

/* ---------- Header ---------- */
.mapa-prest .mp-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  padding: 110px 0 52px;
  text-align: center;
  color: #fff;
}

.mapa-prest .mp-hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(135deg, rgba(23, 162, 184, 0.9), rgba(17, 121, 138, 0.92));
}

.mapa-prest .mp-hero .container {
  position: relative;
}

.mapa-prest .mp-hero-kicker {
  display: inline-block;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.85em;
  margin-bottom: 0.9rem;
}

.mapa-prest .mp-hero-kicker i {
  margin-right: 0.3rem;
}

.mapa-prest .mp-hero h1 {
  font-size: 2.1em;
  font-weight: 500;
  margin: 0 0 0.6rem;
  color: #fff;
}

.mapa-prest .mp-hero p {
  margin: 0;
  font-size: 1.05em;
  opacity: 0.92;
}

.mapa-prest .mp-section {
  padding: 1.75rem 0 3rem;
}

/* ---------- Company picker ---------- */
.mapa-prest .mp-empresas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.mapa-prest .mp-empresa {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1.1rem 0.75rem;
  background: #fff;
  border: 1px solid #eef1f3;
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.05);
  color: #2c2c2c;
  text-align: center;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.mapa-prest .mp-empresa:hover,
.mapa-prest .mp-empresa:focus {
  border-color: #cfe9ee;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.08);
  color: #2c2c2c;
  text-decoration: none;
}

.mapa-prest .mp-empresa img {
  max-width: 120px;
  height: 48px;
  object-fit: contain;
}

.mapa-prest .mp-empresa-nombre {
  font-weight: 600;
  font-size: 1.12em;
}

.mapa-prest .mp-empresa-count {
  font-size: 0.9em;
  color: #777;
}

/* on a company's page the picker becomes a row of pills (scrollable on phones) */
.mapa-prest .mp-empresas.is-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.mapa-prest .mp-empresas.is-compact .mp-empresa {
  flex: 0 0 auto;
  flex-direction: row;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem 0.45rem 0.55rem;
  border-radius: 999px;
}

.mapa-prest .mp-empresas.is-compact .mp-empresa img {
  max-width: 54px;
  height: 22px;
}

.mapa-prest .mp-empresas.is-compact .mp-empresa-nombre {
  font-size: 0.95em;
  white-space: nowrap;
}

.mapa-prest .mp-empresas.is-compact .mp-empresa-count {
  display: none;
}

.mapa-prest .mp-empresa.is-active,
.mapa-prest .mp-empresa.is-active:hover {
  border-color: #17a2b8;
  box-shadow: 0 0 0 2px rgba(23, 162, 184, 0.25);
}

/* ---------- Filters ---------- */
.mapa-prest .mp-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  background: #fff;
  border: 1px solid #eef1f3;
  border-radius: 16px;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.mapa-prest .mp-search {
  position: relative;
  flex: 1 1 260px;
  margin: 0;
}

.mapa-prest .mp-search i {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 0.85em;
}

.mapa-prest .mp-search input,
.mapa-prest .mp-select {
  width: 100%;
  height: 40px;
  border: 1px solid #e6eaee;
  border-radius: 999px;
  background-color: #f5f7f8;
  color: #2c2c2c;
  font: inherit;
  font-size: 0.88em;
}

.mapa-prest .mp-search input {
  padding: 0 1rem 0 2.3rem;
}

.mapa-prest .mp-select {
  flex: 0 1 200px;
  width: auto;
  padding: 0 2rem 0 1rem;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23777' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 12px;
  cursor: pointer;
}

.mapa-prest .mp-search input:focus,
.mapa-prest .mp-select:focus {
  outline: none;
  border-color: #17a2b8;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.15);
}

/* ---------- Map + list ---------- */
.mapa-prest .mp-card {
  display: grid;
  grid-template-columns: 1fr 390px;
  height: 640px;
  background: #fff;
  border: 1px solid #eef1f3;
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.05);
  overflow: hidden;
}

.mapa-prest .mp-map {
  position: relative;
  min-width: 0;
}

.mapa-prest #mp-mapa {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
}

.mapa-prest .mp-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid #f1f3f5;
}

.mapa-prest .mp-side-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1rem 0.7rem;
  border-bottom: 1px solid #f1f3f5;
  font-size: 0.8em;
}

.mapa-prest #mp-contador {
  font-weight: 600;
  font-size: 1.1em;
  white-space: nowrap;
}

.mapa-prest .mp-hint {
  color: #888;
}

.mapa-prest .mp-hint i {
  color: #ea4335;
  margin-right: 0.2rem;
}

.mapa-prest .mp-side-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0.5rem 0.55rem 0.8rem;
}

.mapa-prest .mp-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mapa-prest .mp-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  margin: 0 0 0.3rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.mapa-prest .mp-item:hover,
.mapa-prest .mp-item:focus,
.mapa-prest .mp-item.is-active {
  background: #e8f6f8;
  border-color: #cfe9ee;
  outline: none;
}

.mapa-prest .mp-item-pin {
  flex: 0 0 auto;
  margin-top: 0.15rem;
  color: #ea4335;
  transition: color 0.15s ease, transform 0.15s ease;
}

.mapa-prest .mp-item.is-active .mp-item-pin {
  color: #17a2b8;
  transform: scale(1.25);
}

.mapa-prest .mp-item-body {
  flex: 1 1 auto;
  min-width: 0;
}

.mapa-prest .mp-item-nombre {
  display: block;
  font-weight: 600;
  font-size: 0.88em;
  line-height: 1.3;
}

.mapa-prest .mp-item.is-active .mp-item-nombre {
  color: #11798a;
}

.mapa-prest .mp-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.3rem;
}

.mapa-prest .mp-item-meta {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.75em;
  color: #888;
}

.mapa-prest .mp-chip {
  display: inline-block;
  border: 1px solid #e6eaee;
  border-radius: 999px;
  background: #f5f7f8;
  color: #555;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.3;
  padding: 0.18rem 0.55rem;
}

.mapa-prest .mp-chip-cat {
  background: #e8f6f8;
  border-color: #cfe9ee;
  color: #11798a;
}

.mapa-prest .mp-item.is-active .mp-chip-cat {
  background: #17a2b8;
  border-color: #17a2b8;
  color: #fff;
}

.mapa-prest .mp-chip-plan {
  background: #fff;
  border-color: #fbd3c4;
  color: #c4532d;
}

.mapa-prest .mp-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #777;
}

.mapa-prest .mp-empty > i {
  display: block;
  font-size: 1.6em;
  color: #17a2b8;
  margin-bottom: 0.6rem;
}

/* ---------- Buttons ---------- */
.mapa-prest .mp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.6rem 1.3rem;
  font: inherit;
  font-size: 0.88em;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.mapa-prest .mp-btn-cta {
  background: #fa7a50;
  color: #fff;
  box-shadow: 0 4px 12px rgba(250, 122, 80, 0.35);
}

.mapa-prest .mp-btn-cta:hover,
.mapa-prest .mp-btn-cta:focus {
  background: #f0602f;
  color: #fff;
}

.mapa-prest .mp-btn-teal {
  background: #17a2b8;
  color: #fff;
}

.mapa-prest .mp-btn-teal:hover,
.mapa-prest .mp-btn-teal:focus {
  background: #11798a;
  color: #fff;
}

.mapa-prest .mp-btn-outline {
  background: #fff;
  border-color: #cfe9ee;
  color: #11798a;
}

.mapa-prest .mp-btn-outline:hover,
.mapa-prest .mp-btn-outline:focus {
  background: #e8f6f8;
  color: #11798a;
}

/* ---------- About the data + CTA ---------- */
.mapa-prest .mp-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.25rem;
  background: #fff;
  border: 1px solid #eef1f3;
  border-radius: 16px;
  padding: 1.5rem;
}

.mapa-prest .mp-info-text {
  flex: 1 1 auto;
}

.mapa-prest .mp-info h2 {
  font-size: 1.25em;
  font-weight: 600;
  margin: 0 0 0.6rem;
}

.mapa-prest .mp-info p {
  color: #555;
  font-size: 0.92em;
  line-height: 1.6;
  margin-bottom: 0.6rem;
}

.mapa-prest .mp-info .mp-info-small {
  font-size: 0.8em;
  color: #888;
  margin-bottom: 0;
}

.mapa-prest .mp-info-small i {
  color: #17a2b8;
  margin-right: 0.25rem;
}

.mapa-prest .mp-info-cta {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 0 0 auto;
}

.mapa-prest .mp-info-intro {
  margin-top: 0;
}

/* ---------- Map pieces (Leaflet) ---------- */
.mapa-prest .leaflet-tooltip.mp-tooltip {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.18);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 9px;
  color: #2c2c2c;
}

.mapa-prest .leaflet-tooltip.mp-tooltip small {
  display: block;
  font-weight: 400;
  color: #888;
}

.mapa-prest .mp-fit {
  border: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.15);
  padding: 6px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  color: #11798a;
  cursor: pointer;
}

.mapa-prest .mp-fit:hover {
  background: #e8f6f8;
}

/* ---------- Modal ---------- */
.mp-modal .modal-content {
  border: 0;
  border-radius: 16px;
  overflow: hidden;
}

.mp-modal .mp-modal-head {
  position: relative;
  background: linear-gradient(135deg, #17a2b8, #11798a);
  color: #fff;
  padding: 1.2rem 3rem 1.1rem 1.4rem;
}

.mp-modal .mp-modal-head .close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  color: #fff;
  opacity: 0.85;
  text-shadow: none;
  font-size: 1.6rem;
}

.mp-modal .modal-title {
  margin: 0.5rem 0 0.5rem;
  font-size: 1.2em;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}

.mp-modal .mp-chip {
  display: inline-block;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.3;
  padding: 0.2rem 0.6rem;
}

.mp-modal .mp-chip-light {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
}

.mp-modal .mp-chip-white {
  background: #fff;
  color: #11798a;
}

.mp-modal .mp-modal-body {
  padding: 1.2rem 1.4rem;
}

.mp-modal .mp-datos {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.65rem 1rem;
  margin: 0;
  font-size: 0.9em;
}

.mp-modal .mp-datos dt {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #888;
  padding-top: 0.15rem;
}

.mp-modal .mp-datos dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.mp-modal .mp-datos a {
  color: #11798a;
}

.mp-modal .mp-tel {
  display: inline-block;
  margin: 0 0.75rem 0.2rem 0;
  white-space: nowrap;
}

.mp-modal .mp-tel i {
  margin-right: 0.25rem;
}

.mp-modal .mp-tel .fa-whatsapp {
  color: #25a244;
}

.mp-modal .mp-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.9rem 1.4rem 1.2rem;
  border-top: 1px solid #f1f3f5;
}

.mp-modal .mp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  font-size: 0.85em;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}

.mp-modal .mp-btn-teal {
  background: #17a2b8;
  color: #fff;
}

.mp-modal .mp-btn-teal:hover {
  background: #11798a;
}

.mp-modal .mp-btn-outline {
  background: #fff;
  border-color: #cfe9ee;
  color: #11798a;
}

.mp-modal .mp-btn-outline:hover {
  background: #e8f6f8;
}

/* ---------- Tablet / mobile ---------- */
@media (max-width: 991px) {
  .mapa-prest .mp-card {
    grid-template-columns: 1fr;
    height: auto;
  }

  .mapa-prest .mp-map {
    height: 380px;
  }

  .mapa-prest .mp-side {
    border-left: 0;
    border-top: 1px solid #f1f3f5;
  }

  .mapa-prest .mp-side-list {
    max-height: 560px;
  }
}

@media (max-width: 767px) {
  .mapa-prest .mp-hero {
    padding: 96px 0 40px;
  }

  .mapa-prest .mp-hero h1 {
    font-size: 1.6em;
  }

  .mapa-prest .mp-empresas {
    grid-template-columns: repeat(2, 1fr);
  }

  .mapa-prest .mp-empresas.is-compact {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.4rem;
    scrollbar-width: none;
  }

  .mapa-prest .mp-select {
    flex: 1 1 140px;
  }

  .mapa-prest .mp-map {
    height: 320px;
  }

  .mapa-prest .mp-hint {
    display: none;
  }

  .mapa-prest .mp-info {
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem;
  }

  .mp-modal .mp-datos {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .mp-modal .mp-datos dd {
    margin-bottom: 0.6rem;
  }
}
