.spot {
  display: block;
  position: relative;
  overflow: hidden;
}

.spot__link {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  text-indent: -9999px;
  z-index: 512;
}

.spot--loading {
  height: 200px;
  background: #ddd;
}

.spot--card {
  border: 1px solid #dddddd;
  border-radius: 1rem;
  /* padding: 1rem; */
  background-color: white;

  & .spot__map {
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(0.9) saturate(1.2);             /* removes bottom gap */
  }

  & .spot__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    /* Flexbox to center the title perfectly */
    display: flex;
    align-items: center;         /* vertical center */
    justify-content: center;     /* horizontal center */
    flex-direction: column;
    /* Optional dark overlay for better text readability */
    /* background-color: rgba(0, 0, 0, 0.4); */
  }

  & .spot__name {
    color: white;
    /* font-family: Arial, sans-serif; */
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
    margin: 0;
    padding: 0;
  }
  
  & .spot__city {
    color: white;
  }
}

.spot__forecasts-avg-today {
  position: absolute;
  top: 0.75rem;
  left: 1rem;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
  font-weight: bold;
  font-size: 1.1rem;
  z-index: 10;
}

.spot__wind-forecast-today {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  text-align: right;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
  font-weight: bold;
  font-size: 1.1rem;
  z-index: 10;
}

.spot__tide.tide {
  position: absolute;
  bottom: 0.75rem;
  left: 1rem;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
  font-weight: bold;
  font-size: 1.1rem;
  z-index: 10;
}

.spot__current-wind-direction,
.spot__wind-direction-avg-today {
  text-align: center;
}

.spot__map-container {
  width: 100%;
  /* aspect-ratio: 1 / 1; */
  height: 300px;
  border-radius: 0.5rem;
  overflow: hidden;
  margin-bottom: 1rem;
  position: relative;
}

.spot__map-container:fullscreen {
  height: 100vh;
  width: 100vw;
  border-radius: 0;
  margin-bottom: 0;
}

.spot__map-container:-webkit-full-screen {
  height: 100vh;
  width: 100vw;
  border-radius: 0;
  margin-bottom: 0;
}

.spot__map-container:-moz-full-screen {
  height: 100vh;
  width: 100vw;
  border-radius: 0;
  margin-bottom: 0;
}

.spot__map-container:-ms-fullscreen {
  height: 100vh;
  width: 100vw;
  border-radius: 0;
  margin-bottom: 0;
}

.spot__map-controls {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 1000;
}

.spot__map-controls-bottom {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  z-index: 1000;
}

.spot__map-controls-group {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.spot__map-controls-group--zoom .spot__map-control {
  border-radius: 0;
}

.spot__map-controls-group--zoom .spot__map-control--zoom-in {
  border-top-left-radius: 0.25rem;
  border-top-right-radius: 0.25rem;
  /* border-bottom: none; */
  border-bottom: 2px solid #dddddd;
}

.spot__map-controls-group--zoom .spot__map-control--zoom-out {
  border-bottom-left-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
  border-top: none;
}

.spot__map-control {
  background: white;
  border: 1px solid #ddd;
  border-radius: 0.25rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: bold;
  color: #333;
  /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); */
  border: 2px solid #dddddd;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
  position: relative;
  box-sizing: border-box;
}

.spot__map-control:hover {
  background: #f5f5f5;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.spot__map-control:active {
  background: #e0e0e0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.spot__map-control--zoom-in,
.spot__map-control--zoom-out {
  font-size: 1.5rem;
}

.spot__map-control--zoom-out {
  font-size: 2rem;
  line-height: 0.8;
}

.spot__map-control--fullscreen {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  position: relative;
}

.spot__map-control-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.spot__map-control-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
  display: block;
}

.spot__models {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.spot__model-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: #3B82F6;
  white-space: nowrap;
}

.spot__model-badge--long {
  background: rgba(16, 185, 129, 0.12);
  color: #10B981;
}
/* ---- Spot save button ---- */

.spot-save-btn--saved {
  font-weight: 800;

  & .spot-save-btn__hover-label { display: none; }

  &:hover {
    & .spot-save-btn__label { display: none; }
    & .spot-save-btn__hover-label { display: inline; }
  }
}

/* ---- /Spot save button ---- */

/* ---- Spot show mobile hero ---- */

.spot-show-hero {
  margin-bottom: 1.5rem;

  & .spot__map-container {
    border-radius: 0;
    margin-bottom: 0;
  }
}

.spot-show-hero__panel {
  padding: 1rem;
  background: var(--secondary-background-color, white);
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.spot-show-hero__identity {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.spot-show-hero__name {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.2;
}

.spot-show-hero__location {
  font-size: 0.875rem;
  color: var(--secondary-text-color, #64748b);
  margin: 0;
}

.spot-show-hero__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.spot-show-hero__coords {
  font-size: 0.75rem;
  color: var(--secondary-text-color, #94a3b8);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- Directions button ---- */

.spot-show-hero__directions-btn {
  flex-shrink: 0;
  color: var(--color-primary, #0066ff);

  & svg { fill: var(--color-primary, #0066ff); }
}

/* ---- Directions dialog (bottom sheet) ---- */

.directions-dialog {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  top: auto;
  margin: 0;
  width: 100%;
  max-width: 100%;
  padding: 0;
  border: none;
  border-radius: 1.25rem 1.25rem 0 0;
  background: var(--secondary-background-color, #fff);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
}

.directions-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.directions-dialog__sheet {
  display: flex;
  flex-direction: column;
}

.directions-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.directions-dialog__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-text-color);
}

.directions-dialog__apps {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
}

.directions-app {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  text-decoration: none;
  color: var(--primary-text-color, #1a1a1a);
  transition: background 0.15s ease;

  &:hover,
  &:active {
    background: var(--hover-background-color, rgba(0, 0, 0, 0.04));
    text-decoration: none;
    color: var(--primary-text-color, #1a1a1a);
  }
}

.directions-app__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.directions-app__icon--waze { background: #33ccff; }
.directions-app__icon--google { background: #4285f4; }
.directions-app__icon--apple { background: #1c1c1e; }
.directions-app__icon--osm { background: #7ebc6f; }

.directions-app__name {
  flex: 1;
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary-text-color, #1a1a1a);
}

.directions-app__arrow {
  flex-shrink: 0;
  color: var(--secondary-text-color, #94a3b8);
  height: 40px;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 40px;

  & svg {
    height: 20px;
    width: auto;
    fill: var(--secondary-text-color, #94a3b8);
    /* transform: rotate(180deg); */
  }
}

/* ---- /Spot show mobile hero ---- */

.spot__section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;

  & h2 {
    margin: 0;
  }
}
