#drift-news {
  margin: 0;
  padding: 0;
}

.drift-news-list,
.drift-news-list li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.drift-news-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 640px) {
  .drift-news-list {
    grid-template-columns: 1fr;
  }
}

#drift-news .drift-news-title {
  display: block;
  margin: 1.25rem 0 0.25rem;
  font-size: 1.125rem;
  font-weight: bold;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}

#drift-news .drift-news-timestamp {
  display: block;
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--color-dark);
  padding: 0;
  background: none;
  border: none;
}

#drift-news .drift-news-text {
  display: block;
  margin: 0 0 1.25rem;
  padding: 0;
  font-size: 1rem;
  line-height: 1.6;
  background: none;
  border: none;
}

#drift-map {
  width: 100% !important;
  height: auto !important; /* Anpassa efter innehåll */
  min-height: 400px; /* Minsta höjd för kartan */
}

#drift-map .drift-map-map {
  display: block;
  width: 100% !important;
  height: 400px !important; /* Fast höjd för kartan */
  min-height: 400px;
  flex-shrink: 0; /* Förhindra att kartan krymper */
}

/* Se till att parent-element också kan expandera */
#drift-map .drift-map-info,
#drift-map .drift-map-info.drift-ver2,
#drift-map .drift-map-info.drift-ver3 {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

#drift-map .drift-map-content {
  max-width: 720px;
  margin-bottom: 30px;
  margin-top: 30px;
  min-height: 0 !important; /* Tillåt att containern krymper */
  height: auto !important; /* Anpassa höjd efter innehåll */
  max-height: none !important; /* Ta bort max-höjd */
  overflow: visible !important; /* Se till att innehåll inte klipps */
}

/* Version-specifika regler för content */
#drift-map .drift-map-content.drift-ver2,
#drift-map .drift-map-content.drift-ver3 {
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

#drift-map .drift-map-info-item {
  padding: 10px 30px 30px 30px;
  margin-bottom: 20px; /* Lägg till spacing mellan items */
  position: relative; /* Se till att items inte överlappar */
  display: block; /* Se till att items är block-element */
  clear: both; /* Se till att items inte flyter */
}

#drift-map .drift-map-info-date,
#drift-map .drift-map-info-title,
#drift-map .drift-map-info-timestamp {
  font-style: italic;
  font-size: 0.9em;
}

#drift-map .drift-map-info-title {
  font-weight: 600;
  margin-top: 8px;
}

#drift-map .drift-map-info-text {
  border-top: 1px solid #f0f0f1;
  padding-top: 8px;
}

#drift-map .drift-map-info-type {
  font-size: 1.25rem;
}

#drift-map .drift-map-info-text {
  line-height: 1.8em;
}

#drift-map .drift-map-date.drift-ver2,
#drift-map .drift-map-legend {
  display: inline-block;
}

#drift-map .drift-map-legend {
  float: right;
}

#drift-map .drift-map-legend > span {
  margin: 0 14px 0 7px !important;
}

#drift-map .drift-map-legend > div {
  margin: 0 !important;
}

#drift-map .drift-map-inputs input[type='checkbox'],
#drift-map .drift-map-inputs input[type='radio'] {
  box-sizing: border-box;
  padding: 0;
  margin: 0 7px 0 14px;
}

#drift-map .drift-map-inputs input[type='checkbox']:first-of-type {
  margin: 0 7px 0 0;
}

#drift-map .drift-map-legend.drift-ver3 {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  float: right;
}

#drift-map .drift-map-legend.drift-ver3 > span {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 1rem;
  font-weight: bold;
}

#drift-map .drift-map-legend.drift-ver3 > div {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  display: inline-block;
  margin: 0 6px 0 8px;
}

#drift-map .drift-map-legend.drift-ver3 > div:nth-of-type(1) {
  background: #ef4444;
}
#drift-map .drift-map-legend.drift-ver3 > div:nth-of-type(2) {
  background: #16a34a;
}

#drift-map .drift-map-inputs.drift-ver3 label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 18px;
}

#drift-map .drift-map-inputs.drift-ver3 input[type='checkbox'] {
  margin: 0; /* håll checkbox och label på samma rad */
}

@media (max-width: 640px) {
  #drift-map .drift-map-legend.drift-ver3 {
    float: none;
    display: block;
    margin-top: 8px;
  }
  #drift-map .drift-map-inputs.drift-ver3 {
    display: block;
    margin-top: 6px;
  }
  #drift-map .drift-map-inputs.drift-ver3 label {
    margin-right: 14px;
  }
}

.drift-consent-message {
  padding: 2rem;
  text-align: center;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin: 1rem 0;
}

.drift-consent-message p {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  line-height: 1.5;
  color: #374151;
}

#drift-map .drift-consent-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  height: 100%;
}
