/* embed.css - Embed-Specific Overrides */

/* ========================================
   EMBED-SPECIFIC OVERRIDES
   ======================================== */

body {
  overflow: hidden;
}

#map {
  position: absolute;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

.search-container,
.user-guide,
.add-makerspace {
  display: none !important;
}

.title {
  z-index: 400;
  position: inherit;
  text-decoration: none !important;
}

a {
  text-decoration: none !important;
}

/* ========================================
   DROPDOWNS
   ======================================== */

.embed-dropdown {
  position: relative;
  width: 300px;
  z-index: 1001;
  background-color: var(--dropdown-bg);
  color: var(--text-color);
  border-radius: 20px;
  box-shadow: 0px 4px 8px 1px var(--shadow-color);
  display: none;
  overflow: visible;
}

.embed-dropdown.is-active {
  display: block !important;
  opacity: 1 !important;
}

.embed-dropdown .space-item.target {
  position: relative;
  border-radius: 20px;
  box-shadow: none !important;
}

.suggestion-item {
  border-radius: inherit;
}

/* Header */
.dropdown-header {
  font-family: 'Lato', sans-serif;
  font-weight: normal;
  padding: 8px 16px;
  background: black;
  border-radius: 16px;
  color: white;
  border-bottom: 1px solid var(--dropdown-border);
  position: sticky;
  top: 0;
  z-index: 10;
  opacity: 0.4;
}

/* ========================================
   OUR SPACE PILL
   ======================================== */

.embed-dropdown .space-item .our-space-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: 600;
  margin-bottom: 6px;
}

/* Normal: SpaceAPI-Farbe HG, weißer Text */
.embed-dropdown .space-item.space-open .our-space-pill {
  background: var(--space-open) !important;
  color: white !important;
}

.embed-dropdown .space-item.space-closed .our-space-pill {
  background: var(--space-closed) !important;
  color: white !important;
}

.embed-dropdown .space-item.space-unknown .our-space-pill {
  background: var(--space-unknown) !important;
  color: white !important;
}

.embed-dropdown .space-item.space-default .our-space-pill {
  background: var(--space-hover) !important;
  color: white !important;
}

/* Active/Hover: Weißer HG, SpaceAPI-Farbe Text */
.embed-dropdown .space-item.active .our-space-pill,
.embed-dropdown .space-item:hover:not(.active) .our-space-pill {
  background: white !important;
}

.embed-dropdown .space-item.space-open.active .our-space-pill,
.embed-dropdown .space-item.space-open:hover:not(.active) .our-space-pill {
  color: var(--space-open) !important;
}

.embed-dropdown .space-item.space-closed.active .our-space-pill,
.embed-dropdown .space-item.space-closed:hover:not(.active) .our-space-pill {
  color: var(--space-closed) !important;
}

.embed-dropdown .space-item.space-unknown.active .our-space-pill,
.embed-dropdown .space-item.space-unknown:hover:not(.active) .our-space-pill {
  color: var(--space-unknown) !important;
}

.embed-dropdown .space-item.space-default.active .our-space-pill,
.embed-dropdown .space-item.space-default:hover:not(.active) .our-space-pill {
  color: var(--space-hover) !important;
}

/* ========================================
   SPACE-API FARBEN
   ======================================== */

/* Normal: Name & Icons in SpaceAPI-Farbe */
.embed-dropdown .space-item.space-open .item-name,
.embed-dropdown .space-item.space-open .door-icon-open,
.embed-dropdown .space-item.space-open .style-icon {
  color: var(--space-open);
  font-weight: 600;
}

.embed-dropdown .space-item.space-closed .item-name,
.embed-dropdown .space-item.space-closed .door-icon-closed,
.embed-dropdown .space-item.space-closed .style-icon {
  color: var(--space-closed);
  font-weight: 600;
}

.embed-dropdown .space-item.space-unknown .item-name,
.embed-dropdown .space-item.space-unknown .door-icon-unknown,
.embed-dropdown .space-item.space-unknown .style-icon {
  color: var(--space-unknown);
  font-weight: 600;
}

/* Default (kein API): Schwarz */
.embed-dropdown .space-item.space-default .item-name,
.embed-dropdown .space-item.space-default .style-icon {
  color: var(--text-color);
  font-weight: 600;
}

.embed-dropdown .space-item .item-details {
  color: var(--hover-text-color);
}

/* Active/Hover: SpaceAPI-Farbe HG, Text weiß */
.embed-dropdown .space-item.space-open.active,
.embed-dropdown .space-item.space-open:hover:not(.active) {
  background-color: var(--space-open) !important;
}

.embed-dropdown .space-item.space-closed.active,
.embed-dropdown .space-item.space-closed:hover:not(.active) {
  background-color: var(--space-closed) !important;
}

.embed-dropdown .space-item.space-unknown.active,
.embed-dropdown .space-item.space-unknown:hover:not(.active) {
  background-color: var(--space-unknown) !important;
}

.embed-dropdown .space-item.space-default.active,
.embed-dropdown .space-item.space-default:hover:not(.active) {
  background-color: var(--space-hover) !important;
}

.embed-dropdown .space-item.active *,
.embed-dropdown .space-item:hover:not(.active) * {
  color: white !important;
}

/* ========================================
   POPUP & LOADING
   ======================================== */

.back-to-target {
  color: var(--space-hover);
  font-size: 0.9em;
}

.back-to-target:hover {
  color: var(--text-color);
}

@media (prefers-color-scheme: dark) {
  .back-to-target {
    color: #66b3ff;
  }
}

.loading,
.error {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2000;
  background: var(--dropdown-bg);
  color: var(--text-color);
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 4px 12px var(--shadow-color);
}

.loading {
  font-size: 18px;
}

.error {
  max-width: 400px;
  text-align: center;
}

.error-title {
  font-weight: 600;
  font-size: 18px;
  color: #d32f2f;
  margin-bottom: 8px;
}

.error-message {
  color: var(--hover-text-color);
}

/* ========================================
   MINIMAP
   ======================================== */

#minimap-container {
  width: 300px;
  height: 180px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0px 4px 8px 1px var(--shadow-color);
  border: 1px solid black;
}

#minimap {
  width: 100%;
  height: 100%;
}

.minimap-marker {
  width: 12.5px !important;
  height: 20.5px !important;
  transition: transform 0.3s ease;
}

.minimap-marker svg,
.minimap-marker img {
  width: 12.5px !important;
  height: 20.5px !important;
}

.minimap-marker.active svg,
.minimap-marker.active img {
  transform: scale(1.5) !important;
}

.minimap-marker.active {
  z-index: 1000 !important;
}

.minimap-marker.active svg path {
  color: black !important;
  filter: hue-rotate(180);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 800px) {
  #embed-sidebar {
    transform: scale(0.8);
    transform-origin: top left;
  }
}

@media (max-height: 600px) {
  #minimap-container {
    display: none !important;
  }
}