/* sita_info.css */
@import url('sita_palette.css');

#info-panel {
  position: absolute;
  top: 86px;
  right: 16px;
  z-index: 9999;
  display: none;
  width: min(410px, calc(100vw - 32px));
  max-height: calc(100dvh - 112px);
  box-sizing: border-box;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 18px;
  background: rgba(255,255,255,0.97);
  box-shadow: 0 12px 34px rgba(15,23,42,0.20), 0 2px 8px rgba(15,23,42,0.08);
  color: var(--sita-panel-text);
  font-family: var(--font-sita);
}

#info-panel hr {
  display: none;
}

#info-cat-contenido {
  max-height: inherit;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#info-cat-contenido::-webkit-scrollbar,
.sita-listbox::-webkit-scrollbar {
  width: 6px;
}

#info-cat-contenido::-webkit-scrollbar-thumb,
.sita-listbox::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(100,116,139,0.28);
}

.info-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 14px;
  box-sizing: border-box;
}

.info-detalle {
  display: grid;
  gap: 12px;
}

.info-header {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 4px 42px 10px 2px;
  border-bottom: 1px solid rgba(15,23,42,0.08);
}

.info-kicker {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(34,181,115,0.12);
  color: var(--sita-green-dark);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.info-title {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--sita-panel-text);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.info-location {
  overflow-wrap: anywhere;
  color: var(--sita-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}

.info-data-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.info-row {
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 54px;
  box-sizing: border-box;
  padding: 9px 10px;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 12px;
  background: #F8FAFC;
}

.info-label {
  overflow: hidden;
  color: var(--sita-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-value {
  overflow: hidden;
  color: var(--sita-panel-text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-subtitle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 0;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.info-subtitle::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--sita-green);
  box-shadow: 0 0 0 4px rgba(34,181,115,0.12);
}

#info-panel .admin-coordinate-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 12px;
  background: #F8FAFC;
}

#info-panel .admin-coordinate-btn {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--sita-green);
  border-radius: 12px;
  background: var(--sita-green);
  color: #fff;
  font-family: var(--font-sita);
  font-size: 12px;
  font-weight: 800;
}

#info-panel .admin-coordinate-btn.secondary {
  border-color: rgba(15,23,42,0.10);
  background: #fff;
  color: var(--sita-panel-text);
}

#info-panel .admin-coordinate-status {
  flex: 1 0 100%;
  min-height: 14px;
  color: var(--sita-muted);
  font-size: 12px;
  font-weight: 600;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15,23,42,0.10);
  color: #475569;
  font: inherit;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.close-btn:hover {
  background: #F0FAF5;
  color: var(--sita-green-dark);
  box-shadow: 0 8px 20px rgba(15,23,42,0.14);
  transform: translateY(-1px);
}

.close-btn:focus-visible,
.restricted-detail-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(34,181,115,0.16);
}

.selector-container {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.selector-box {
  display: grid;
  grid-template-rows: auto minmax(112px, 112px);
  gap: 7px;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 14px;
  background: #F8FAFC;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.selector-box:hover {
  background: #fff;
  border-color: rgba(34,181,115,0.22);
}

.selector-box.active {
  background: #F0FAF5;
  border-color: rgba(34,181,115,0.28);
  box-shadow: inset 0 0 0 1px rgba(34,181,115,0.12), 0 6px 16px rgba(20,134,83,0.10);
}

.selector-title {
  overflow: hidden;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selector-box select {
  width: 100%;
  margin: 0;
  padding: 6px 4px;
  border: 0;
  background: transparent;
  color: var(--sita-panel-text);
  font: inherit;
  font-size: 13px;
  text-align: center;
  outline: none;
  appearance: none;
  cursor: pointer;
}

.selector-box.active select {
  font-weight: 700;
}

.selector-box select option {
  background: #fff;
  color: var(--sita-panel-text);
}

.sita-listbox {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 112px;
  max-height: 112px;
  padding: 0 2px 2px;
  overflow-y: auto;
  font-size: 13px;
  cursor: pointer;
}

.sita-listbox-item {
  min-height: 28px;
  box-sizing: border-box;
  padding: 6px 5px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255,255,255,0.78);
  color: #334155;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sita-listbox-item:hover {
  background: rgba(34,181,115,0.12);
  color: var(--sita-green-dark);
}

.sita-listbox-item.active {
  background: var(--sita-green);
  color: #fff;
  font-weight: 800;
}

.info-puerta {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(34,181,115,0.18);
  border-radius: 14px;
  background: #F0FAF5;
  color: var(--sita-panel-text);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.70);
}

.info-puerta > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.3;
}

.info-puerta b {
  flex: 0 0 auto;
  color: var(--sita-green-dark);
  font-weight: 800;
}

.info-puerta span {
  min-width: 0;
  color: var(--sita-panel-text);
  font-weight: 800;
  text-align: right;
}

#precio-estimado {
  overflow-wrap: anywhere;
  white-space: pre-line;
}

#precio-estimado-row {
  align-items: flex-start;
}

#precio-estimado-row b {
  padding-top: 1px;
}

.restricted-detail-cta {
  grid-column: 1 / -1;
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  border: 1px solid rgba(34,181,115,0.16);
  border-radius: 14px;
  background: #F0FAF5;
  text-align: center;
}

.restricted-detail-cta p {
  max-width: 300px;
  margin: 0 auto 12px;
  color: var(--sita-panel-text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.restricted-detail-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.restricted-detail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 36px;
  box-sizing: border-box;
  padding: 8px 14px;
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 12px;
  background: #fff;
  color: var(--sita-panel-text);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.restricted-detail-btn.primary {
  border-color: var(--sita-green);
  background: var(--sita-green);
  color: #fff;
}

.restricted-detail-btn:hover {
  background: #F0FAF5;
  color: var(--sita-green-dark);
  text-decoration: none;
  transform: translateY(-1px);
}

.restricted-detail-btn.primary:hover {
  background: var(--sita-green-hover);
  color: #fff;
}

.info-resumen-movil {
  display: none;
  min-height: 54px;
  box-sizing: border-box;
  padding: 9px 46px 9px 10px;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 14px;
  background: #F8FAFC;
  color: var(--sita-panel-text);
  cursor: pointer;
}

.resumen-linea,
.resumen-linea-sec {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resumen-linea {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.resumen-linea-sec {
  margin-top: 2px;
  color: var(--sita-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.resumen-linea-rc {
  display: none;
}

@media (max-width: 600px) {
  #info-panel {
    top: 78px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100dvh - 154px);
    border-radius: 18px;
  }

  .info-card {
    gap: 10px;
    padding: 10px;
  }

  .info-header {
    padding-right: 42px;
  }

  .info-title {
    font-size: 16px;
  }

  .info-data-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .info-row {
    min-height: 44px;
    padding: 8px 10px;
  }

  .selector-container {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .selector-box {
    grid-template-rows: auto minmax(92px, 92px);
    padding: 6px 4px;
    border-radius: 12px;
  }

  .selector-title {
    font-size: 10px;
  }

  .sita-listbox {
    min-height: 92px;
    max-height: 92px;
    font-size: 12px;
  }

  .sita-listbox-item {
    min-height: 26px;
    padding: 6px 3px;
  }

  .info-puerta > div {
    display: grid;
    gap: 2px;
  }

  .info-puerta span {
    text-align: left;
  }
}
