/* ============================================
   3D Viewer — App Styles
   Extends pibico.css — Three.js viewers
   ============================================ */

/* --- Body background --- */
body {
  background: linear-gradient(135deg, #2c5171 0%, #4682b4 50%, #6a9bc3 100%);
  min-height: 100vh;
  overflow: hidden;
}

/* --- Navbar (floating frosted glass) --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.75rem;
  background: transparent;
  gap: 0.35rem;
}

.navbar-title {
  font-family: var(--pibico-font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1 1 auto;
  white-space: nowrap;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  flex-shrink: 1;
  min-width: 0;
}

.nav-link {
  font-family: var(--pibico-font-button);
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  padding: 0.3rem 0.6rem;
  border-radius: var(--pibico-radius-sm);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-weight: 600;
}

/* --- Toolbar buttons inside navbar-title --- */
.toolbar-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 0.5rem;
  flex-shrink: 1;
  flex-wrap: wrap;
}

.toolbar-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 2px;
}

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--pibico-radius-xs);
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
}

.toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.toolbar-btn.active {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.toolbar-btn-accent {
  background: rgba(179, 58, 43, 0.7);
  color: #fff;
  border-color: rgba(179, 58, 43, 0.8);
}

.toolbar-btn-accent:hover {
  background: rgba(179, 58, 43, 0.9);
  border-color: rgba(179, 58, 43, 1);
}

/* --- Footer --- */
.app-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.35rem 1.5rem;
  background: transparent;
  font-family: var(--pibico-font-body);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.app-footer a {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.footer-separator {
  color: rgba(255, 255, 255, 0.25);
  margin: 0 0.15rem;
}

/* --- Canvas Container --- */
/* --- Viewer page overrides (light background) --- */
.page-viewer .navbar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.page-viewer .navbar-title {
  color: var(--pibico-steel-dark);
  -webkit-text-fill-color: var(--pibico-steel-dark);
}

.page-viewer .toolbar-btn {
  border-color: var(--pibico-grey-mid);
  color: var(--pibico-steel-blue);
}

.page-viewer .toolbar-btn:hover {
  background: var(--pibico-steel-pale);
  border-color: var(--pibico-steel-blue);
  color: var(--pibico-steel-dark);
}

.page-viewer .toolbar-btn.active {
  background: var(--pibico-steel-blue);
  color: #fff;
  border-color: var(--pibico-steel-blue);
}

.page-viewer .toolbar-btn-accent {
  background: var(--pibico-red-brick);
  color: #fff;
  border-color: var(--pibico-red-brick);
}

.page-viewer .toolbar-btn-accent:hover {
  background: var(--pibico-brick-dark);
  border-color: var(--pibico-brick-dark);
}

.page-viewer .toolbar-divider {
  background: var(--pibico-grey-mid);
}

.page-viewer .nav-link {
  color: var(--pibico-steel-blue);
}

.page-viewer .nav-link:hover {
  background: var(--pibico-steel-pale);
  color: var(--pibico-steel-dark);
}

.page-viewer .nav-link.active {
  background: var(--pibico-steel-pale);
  color: var(--pibico-steel-dark);
}

.page-viewer .nav-dropdown-toggle {
  color: var(--pibico-steel-blue);
}

.page-viewer .nav-dropdown-toggle:hover,
.page-viewer .nav-dropdown.open .nav-dropdown-toggle {
  background: var(--pibico-steel-pale);
  color: var(--pibico-steel-dark);
}

.page-viewer .app-footer {
  color: var(--pibico-grey-dark);
}

.page-viewer .app-footer a {
  color: var(--pibico-steel-blue);
}

.page-viewer .footer-separator {
  color: var(--pibico-grey-mid);
}

/* --- Cruz de la Victoria 3D Card --- */
.cruz-card {
  position: fixed;
  top: 52px;
  left: 12px;
  z-index: 90;
  background: transparent;
  padding: 0;
  text-align: center;
  transition: opacity 0.3s ease;
  pointer-events: auto;
}

.escudo-wrapper {
  position: relative;
  width: 60px;
}

.escudo-bg {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  top: 7px;
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

.escudo-wrapper canvas {
  position: absolute;
  top: 0%;
  left: 0%;
  width: 100%;
  height: 82%;
  z-index: 2;
  pointer-events: auto;
  opacity: 0;
}

/* --- Canvas Container --- */
.canvas-container {
  position: fixed;
  top: 52px;
  left: 0;
  right: 0;
  bottom: 40px;
}

.canvas-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.canvas-fullscreen {
  top: 0;
  bottom: 0;
}

/* =============================================
   VIEWER-SPECIFIC STYLES
   ============================================= */

/* --- Info Panel --- */
.info-panel {
  position: fixed;
  top: 52px;
  right: 0;
  width: 300px;
  bottom: 40px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: -2px 0 12px rgba(0, 0, 0, 0.1);
  padding: 16px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 90;
}

.info-panel.visible {
  transform: translateX(0);
}

.info-panel h3 {
  font-family: var(--pibico-font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--pibico-steel-dark);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--pibico-steel-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-group {
  margin-bottom: 14px;
}

.info-group-title {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pibico-grey-dark);
  margin-bottom: 6px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 0.82rem;
}

.info-row .label {
  color: var(--pibico-grey-dark);
}

.info-row .value {
  font-weight: 600;
  color: var(--pibico-near-black);
  font-variant-numeric: tabular-nums;
}

/* --- Drag & Drop Overlay --- */
.drop-overlay {
  position: fixed;
  top: 52px;
  left: 0;
  right: 0;
  bottom: 40px;
  background: rgba(70, 130, 180, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  pointer-events: none;
}

.drop-overlay.active {
  display: flex;
}

.drop-overlay-content {
  text-align: center;
  color: #fff;
}

.drop-overlay-content svg {
  margin-bottom: 16px;
  opacity: 0.9;
}

.drop-overlay-content p {
  font-family: var(--pibico-font-heading);
  font-size: 1.3rem;
  font-weight: 600;
}

.drop-overlay-content .formats {
  display: block;
  font-size: 0.85rem;
  font-weight: 400;
  opacity: 0.8;
  margin-top: 4px;
}

/* --- Loading Spinner --- */
.loading-overlay {
  position: fixed;
  top: 52px;
  left: 0;
  right: 0;
  bottom: 40px;
  background: rgba(232, 236, 241, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 150;
}

.loading-overlay.active {
  display: flex;
}

.loading-content {
  text-align: center;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #E0E0E0;
  border-top-color: var(--pibico-steel-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-content p {
  font-family: var(--pibico-font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--pibico-grey-dark);
}

/* --- Welcome Message --- */
.welcome-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  z-index: 10;
}

.welcome-message svg {
  width: 56px;
  height: 56px;
  color: var(--pibico-steel-light);
  opacity: 0.5;
  margin-bottom: 16px;
}

.welcome-message h2 {
  font-family: var(--pibico-font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--pibico-steel-dark);
  margin-bottom: 8px;
}

.welcome-message p {
  font-size: 0.9rem;
  color: var(--pibico-grey-dark);
}

/* =============================================
   WORLD-SPECIFIC STYLES
   ============================================= */

/* --- Tooltip --- */
.tooltip-3d {
  position: fixed;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  padding: 10px 14px;
  font-family: var(--pibico-font-body);
  font-size: 0.82rem;
  line-height: 1.4;
  color: #2D2D2D;
  z-index: 300;
  display: none;
  transform: translate(-50%, -120%);
}

.tooltip-3d .tt-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--pibico-steel-dark);
  margin-bottom: 2px;
}

.tooltip-3d .tt-elev { color: var(--pibico-grey-dark); }
.tooltip-3d .tt-capital { font-size: 0.78rem; color: #CB4154; font-weight: 600; }
.tooltip-3d .tt-pop { color: var(--pibico-grey-dark); font-size: 0.78rem; }
.tooltip-3d .tt-source { color: #999; font-size: 0.68rem; font-style: italic; margin-top: 2px; }

/* --- Info Overlay (bottom-left) --- */
.info-overlay {
  position: fixed;
  bottom: 52px;
  left: 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  padding: 14px 18px;
  font-family: var(--pibico-font-body);
  font-size: 0.82rem;
  line-height: 1.4;
  color: #2D2D2D;
  z-index: 90;
  max-width: 280px;
  transition: opacity 0.3s ease;
}

.info-overlay h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--pibico-steel-dark);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-ov-row {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
}

.info-ov-row .lbl { color: var(--pibico-grey-dark); }
.info-ov-row .val { font-weight: 600; font-variant-numeric: tabular-nums; }
.info-ov-license { font-size: 0.62rem; color: #999; font-style: italic; margin-top: 4px; line-height: 1.3; }

/* --- Legend (bottom-right) --- */
.legend {
  position: fixed;
  bottom: 52px;
  right: 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  padding: 12px 16px;
  font-family: var(--pibico-font-body);
  font-size: 0.78rem;
  z-index: 90;
  transition: opacity 0.3s ease;
}

.legend h4 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--pibico-steel-dark);
  margin-bottom: 8px;
}

.legend-bar {
  width: 180px;
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, #2d6a4f, #52b788, #b5a642, #a0522d, #d4d4d4, #ffffff);
  margin-bottom: 4px;
}

.legend-labels {
  display: flex;
  justify-content: space-between;
  color: var(--pibico-grey-dark);
  font-size: 0.72rem;
}

/* --- World Loading --- */
.world-loading {
  position: fixed;
  top: 52px;
  left: 0;
  right: 0;
  bottom: 40px;
  background: rgba(232, 236, 241, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  transition: opacity 0.5s ease;
}

.world-loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.world-loading .spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #E0E0E0;
  border-top-color: var(--pibico-steel-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

.world-loading p {
  font-family: var(--pibico-font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--pibico-grey-dark);
  text-align: center;
}

/* --- Detail Slide Panel --- */
.detail-card {
  position: fixed;
  top: 52px;
  right: 0;
  width: 45%;
  max-width: 420px;
  bottom: 40px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-radius: 0;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  font-family: var(--pibico-font-body);
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.detail-card.visible {
  transform: translateX(0);
}

.detail-card-header {
  background: linear-gradient(135deg, #3A6F9A, #4682B4);
  padding: 14px 16px;
  color: #fff;
  position: relative;
}

.detail-card-header h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 2px 0;
  border: none;
  padding: 0;
  color: #fff;
}

.detail-card-header .dc-capital {
  font-size: 0.8rem;
  opacity: 0.85;
  font-weight: 400;
}

.detail-card-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.detail-card-close:hover {
  background: rgba(255, 255, 255, 0.35);
}

.detail-card-body {
  padding: 14px 16px;
}

.dc-section {
  margin-bottom: 12px;
}

.dc-section:last-child {
  margin-bottom: 0;
}

.dc-section-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--pibico-steel-blue);
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #E8ECF1;
}

.dc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 0.82rem;
}

.dc-row .dc-lbl { color: var(--pibico-grey-dark); }
.dc-row .dc-val { font-weight: 600; color: #2D2D2D; font-variant-numeric: tabular-nums; }

.dc-highlights {
  font-size: 0.8rem;
  color: #4A4A4A;
  line-height: 1.5;
  padding: 8px 10px;
  background: #F5F7FA;
  border-radius: 8px;
  border: none;
}

/* --- Nav Dropdown --- */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  font-family: var(--pibico-font-button);
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  padding: 0.3rem 0.6rem;
  border-radius: var(--pibico-radius-sm);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-dropdown-toggle .chevron {
  transition: transform 0.2s ease;
}

.nav-dropdown.open .chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 160px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  border-radius: var(--pibico-radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.2s ease;
  z-index: 400;
}

.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-family: var(--pibico-font-button);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--pibico-steel-blue);
  text-decoration: none;
  border-radius: var(--pibico-radius-xs);
  transition: all 0.15s ease;
}

.nav-dropdown-item:hover {
  background: var(--pibico-steel-pale);
  color: var(--pibico-steel-dark);
}

.nav-dropdown-item.active {
  background: var(--pibico-steel-pale);
  color: var(--pibico-steel-dark);
  font-weight: 600;
}

/* =============================================
   GLOBE-SPECIFIC STYLES
   ============================================= */

.globe-loading {
  position: fixed;
  inset: 0;
  background: #060a1a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 200;
  transition: opacity 0.6s ease;
}

.globe-loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.globe-loading .spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(70, 130, 180, 0.15);
  border-top-color: var(--pibico-steel-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.globe-loading p {
  font-family: var(--pibico-font-body);
  font-size: 0.85rem;
  color: var(--pibico-grey-dark);
}

/* --- Search locator --- */
.search-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 8px;
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.search-input {
  font-family: var(--pibico-font-body);
  font-size: 0.78rem;
  padding: 5px 10px 5px 28px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--pibico-radius-xs);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  -webkit-text-fill-color: #fff;
  width: 170px;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
  width: 220px;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.45);
  opacity: 1;
}

.search-results {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 240px;
  max-width: calc(100vw - 24px);
  max-height: 280px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  border-radius: var(--pibico-radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  display: none;
  z-index: 120;
}

.search-results.visible {
  display: block;
}

.search-result-item {
  padding: 8px 12px;
  cursor: pointer;
  font-family: var(--pibico-font-body);
  font-size: 0.8rem;
  color: var(--pibico-near-black);
  -webkit-text-fill-color: var(--pibico-near-black);
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover,
.search-result-item.active {
  background: var(--pibico-steel-pale);
}

.search-result-item .sr-name {
  font-weight: 600;
}

.search-result-item .sr-concejo {
  font-size: 0.7rem;
  color: var(--pibico-grey-dark);
  -webkit-text-fill-color: var(--pibico-grey-dark);
  margin-left: 8px;
  flex-shrink: 0;
}

.search-result-item .sr-name mark {
  background: rgba(70, 130, 180, 0.2);
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}

/* --- Pulsing highlight marker (search result) --- */
@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.6); }
}

/* =============================================
   RESPONSIVE
   ============================================= */

/* -- Narrow: hide text labels, keep icons -- */
@media (max-width: 1100px) {
  .nav-link,
  .nav-dropdown-toggle {
    font-size: 0;
    gap: 0;
    padding: 0.3rem 0.5rem;
  }

  .nav-link svg,
  .nav-dropdown-toggle svg {
    width: 16px;
    height: 16px;
  }

  .navbar-title {
    font-size: 0;        /* hide title text, show toolbar only */
  }

  .toolbar-group {
    margin-left: 0;
  }
}

/* -- Mobile: compact everything -- */
@media (max-width: 768px) {
  .navbar-nav {
    gap: 0.15rem;
  }

  .nav-link,
  .nav-dropdown-toggle {
    padding: 0.25rem 0.35rem;
  }

  .toolbar-group {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* -- Mobile -- */
@media (max-width: 768px) {
  .navbar {
    padding: 0.3rem 0.5rem;
    gap: 0.25rem;
  }

  .navbar-title {
    gap: 0.3rem;
    width: 100%;
  }

  .toolbar-group {
    gap: 2px;
  }

  .cruz-card {
    top: 44px;
    left: 4px;
  }

  .escudo-wrapper {
    width: 45px;
  }

  .toolbar-divider {
    height: 18px;
  }

  .search-input {
    width: 90px;
    font-size: 16px;            /* prevent iOS zoom on focus */
    padding: 4px 8px 4px 24px;
    -webkit-text-size-adjust: 100%;
  }

  .search-input:focus {
    width: 140px;
  }

  .search-icon svg {
    width: 12px;
    height: 12px;
  }

  .search-results {
    min-width: 200px;
  }

  .info-panel {
    width: 260px;
  }

  .info-overlay {
    max-width: 180px;
    font-size: 0.7rem;
    padding: 10px;
  }

  .info-overlay h4 {
    font-size: 0.8rem;
  }

  .legend {
    display: none;
  }

  .detail-card {
    width: 100%;
    max-width: none;
    top: 42px;
    bottom: 28px;
  }

  .app-footer {
    padding: 0.2rem 0.75rem;
    font-size: 0.65rem;
  }

  .tooltip-3d {
    font-size: 0.7rem;
    padding: 6px 10px;
  }
}

/* -- Small phones -- */
@media (max-width: 480px) {
  .toolbar-btn {
    padding: 4px 5px;
  }

  .toolbar-btn svg {
    width: 14px;
    height: 14px;
  }

  .search-input {
    width: 70px;
  }

  .search-input:focus {
    width: 120px;
  }

  .detail-card-header h3 {
    font-size: 0.9rem;
  }

  .detail-card-body {
    padding: 10px 12px;
    font-size: 0.8rem;
  }
}
