/* TODO: need to play with rotation of arrow to make sure its correct */


/* ==========================================================================
   1. Base/Reset Styles
   ========================================================================== */
   html {
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    padding: 0;
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}



/* ==========================================================================
   2. Layout & Grid
   ========================================================================== */

#list {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

#list:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   3. Search & Filter Components
   ========================================================================== */
#filter-row {
    position: sticky;
    top: 0;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
    padding: 14px 10px;
}

#find-spot-text {
    font-size: 1.2rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.filter-container {
    flex: 1;
    display: flex;
    align-items: center;
    max-width: 200px;
    margin-right: 0;
}

.filter-container label {
    margin-right: 10px;
    white-space: nowrap;
}

.filter-container input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

.filter-container input[type="text"]::placeholder {
    color: #999;
}

.search-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.search-container {
    max-width: 300px;
    min-width: 120px;
    margin-right: 10px;
    margin-left: auto;
    position: relative;
    display: flex;
    align-items: center;
}

#searchInput {
    width: 100%;
    padding: 6px 24px;
    border: 1px solid #DDDDDD;
    border-radius: 24px;
    font-size: 14px;
    line-height: 20px;
    outline: none;
    transition: box-shadow 0.2s ease;
    height: 32px;
    box-sizing: border-box;
}

#searchInput:focus {
    border-color: #222222;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Form Elements */
select {
    padding: 4px;
    font-size: 1rem;
    border-radius: 5px;
    border: 1px solid #ddd;
    transition: border-color 0.3s ease;
    min-width: 120px;
}

select:hover {
    border-color: #007bff;
}

#searchInput, select {
    height: 30px;
    box-sizing: border-box;
}

/* ==========================================================================
   4. Map Components
   ========================================================================== */
#map {
    width: 100%;
    height: 600px;
    margin: 0;
}

/* Map Markers */
.custom-icon {
    text-align: center;
    width: 150px;
    height: 40px;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.icon-container {
    position: relative;
    flex-wrap: wrap;
    position: relative;
    flex-wrap: wrap;
    left: -50%;
    top: -50%;
    width: auto;
    min-width: fit-content;
    background-color: #ffffffb7;
    border: 2px solid darkgray;
    border-radius: 20px;
    padding: 6px 10px;
    display: inline-block;
    justify-content: center;
    align-items: center;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
}

.custom-icon.working .icon-container {
    background-color: #3edf68b0;
}

.icon-text {
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: rgb(53 53 53);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.icon-type {
    font-size: 20px;
    color: white;
    text-align: right;
    margin-left: 5px;
}

/* Map Clusters
.custom-cluster {
    background-color: #0087db96;
    color: white;
    border-radius: 10px;
    font-weight: bold;
    font-size: 14px;
    width: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 5px;
} */

/* .cluster-small { height: 50px; }
.cluster-medium { height: 100px; }
.cluster-large { height: 200px; } */

/* Map Marker States */
.leaflet-marker-icon.custom-icon.selected .icon-container {
    border: 2px solid #000000;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.leaflet-marker-icon.custom-icon.greyed-out .icon-container {
    opacity: 0.9;
}

.leaflet-marker-icon.custom-icon.greyed-out .icon-text,
.leaflet-marker-icon.custom-icon.greyed-out .icon-type,

.leaflet-marker-icon.custom-icon.greyed-out {
    pointer-events: none;
}

/* ==========================================================================
   5. Spot/Card Components
   ========================================================================== */
.spot {
    padding: 0;
    margin-bottom: 20px;
    background-color: #fafafa;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    /* transition: transform 0.3s ease; */
    position: relative;
}

.spot.selected {  
    border: 2px solid #007BFF;
    background-color: #E9F5FF;
}

.spot:last-child {
    margin-bottom: 0;
}

.spot p {
    margin: 2px;
    color: #555;
    font-size: 14px;
}
/* Styling for navigate to spot button
.spot a {
    display: inline-block;
    padding: 10px 15px;
    background-color: #161616e9;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
} */

/* Kitespot Grid */
.kitespot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
    padding: 0;
}

.kitespot-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 0;
}

/* image container is used both in list and bottom sheet view, maybe need to split? */

.bottom-sheet-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
    padding-left: 6px;
    padding-right: 6px;
    padding-top: 6px;
    padding-bottom: 6px;
}


.kitespot-image-container-bottom-sheet {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.kitespot-image-container-bottom-sheet h2 {
    position: relative; 
    padding: 8px;
    color: white;
    border-radius: 6px;
    text-shadow: 1px 1px 3px  rgba(0, 0, 0, 0.126);
    /* max-width: calc(100% - 20px); */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    order: 0;
    font-size: 1.2em;
}

.h2 {
    position: relative; 
    padding: 8px;
    color: white;
    border-radius: 6px;
    margin-top: 0;
    margin-bottom: 0;
    text-shadow: 1px 1px 3px  rgba(0, 0, 0, 0.126);
    /* max-width: calc(100% - 20px); */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    order: 0;
    font-size: 1.2em;
}

.kitespot-image-container-bottom-sheet::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    pointer-events: none;
}

.kitespot-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    background-color: #e0e8ff; /* Shows while loading */
}

.kitespot-content {
    padding: 8px 8px 20px 8px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    margin-top: 0;
}

#kitespot-list {
    max-height: calc(100vh - 55px);
    overflow-y: auto;
    padding: 14px;
}

/* ==========================================================================
   6. UI Components
   ========================================================================== */

/* Loading Animation */
.loading {
    text-align: center;
    font-size: 24px;
    color: #333;
    padding: 20px;
    background-color: #f0f0f0;
    border-radius: 5px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.loading::before {
    content: '';
    width: 30px;
    height: 30px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #000000;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Description Components */
.description-container {
    position: relative;
    margin-bottom: 10px;
}

.more-button {
    display: none;
}

.description-preview,
.full-description {
    margin: 0;
    padding: 0;
}

/* Feedback Button */
.feedback-button {
    position: fixed;
    right: 1rem;
    z-index: 1001;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-decoration: none;
    color: black;
    bottom: 1rem;
    display: block; /* Explicitly set display for desktop */
}

.feedback-button:hover {
    background-color: #0056b3;
}

/* Styling for navigate to spot button*/
.navigate-button {
    display: inline-block;
    padding: 8px 20px;
    margin-top: 10px;
    background-color: #161616e9;
    color: white;
    text-decoration: none;
    width: 140px;
    border-radius: 20px;
    text-align: center;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

/* Banner Container */
.banner-container {
    width: calc(100% + 28px);
    margin: 16px -14px -14px -14px;
}

/* Banner container in side panel (has 16px padding instead of 14px) */
.spot-side-panel .banner-container {
    width: calc(100% + 32px);
    margin: 16px -16px -16px -16px;
}

/* Spot Banner Styling */
.spot-banner {
    display: block;
    margin: 0;
    padding: 14px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 0;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    width: 100%;
    box-sizing: border-box;
}

.spot-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
    opacity: 0.95;
}

.more-info-button {
    display: inline-block;
    padding: 2px 6px;
    background-color: #161616e9;
    color: white;
    text-decoration: none;
    appearance: none;
    border-radius: 5px;
    font-size: 0.8em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;

}
/* .description-content {
} */

/* ==========================================================================
   7. Animations
   ========================================================================== */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   8. Media Queries
   ========================================================================== */


@media (max-width: 768px) {
    #filter-row {
        flex-direction: row;
        align-items: flex-start;
    }
    
    /* #find-spot-text {
        margin-bottom: 10px;
    } */

    #list {
        padding: 5px;
    }

    .spot {
        padding: 5px;
    }

    .spot h2 {
        font-size: 1.2em;
    }

    .spot a {
        padding: 8px 12px;
    }
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    font-size: 1.5rem;
    margin: 0;
}

/* Filters */
.filter-toggle {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.filter-section {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: white;
    padding: 1rem;
    z-index: 999;
    transition: transform 0.3s ease;
}

.filter-section.collapsed {
    transform: translateY(-100%);
}

/* Map */
.main-content {
    height: calc(100vh - 55px);
}

.map-container {
    width: 100%;
    height: 100%;
}

/* Spot Bottom Sheet Panel */
.spot-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
}

.spot-bottom-sheet.visible {
    transform: translateY(0);
}

.bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 10px auto;
}

.bottom-sheet-content {
    padding: 1rem;
    max-height: 70vh;
    overflow-y: auto;
}

/* Desktop styles */
@media (min-width: 768px) {
    .filter-toggle {
        display: none;
    }
    
    .filter-section {
        position: static;
        transform: none;
    }
    
}

/* Mobile-specific styles */
@media (max-width: 767px) {
  /* Layout changes */
  .container {
    flex-direction: column;
    gap: 0;
    height: 100%;
    position: relative;
  }

  #map {
    height: 100%;
  }

  /* Header and filters
  #filter-row {
    width: 100%;
    flex-direction: row;
    padding: 14px 10px;
    background: white;
    z-index: 1000;
  } */

  .filter-container {
    width: 100%;
  }

  .search-container {
    width: 100%;
    max-width: none;
  }

  #find-spot-text {
    width: 100%;
    margin-bottom: 10px;
  }

  /* Bottom sheet for spot details */
  .spot-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    z-index: 1001;
    max-height: 90vh;
  }

  .spot-bottom-sheet.visible {
    transform: translateY(0);
  }

  .bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 10px auto;
  }

  .bottom-sheet-content {
    max-height: 80vh; /* Increased from 70vh to 80vh */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Adjust feedback button position */
  .feedback-button {
    display: none !important; /* Use !important to override any other styles */
  }

  /* Hide the kitespot grid on mobile */
  .kitespot-grid {
    display: none;
  }

  /* Show only the selected spot in the bottom sheet panel */
  .spot-bottom-sheet .kitespot-card {
    display: block;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
  }

  /* Adjust the image container height for mobile */
  .spot-bottom-sheet .kitespot-image-container-bottom-sheet {
    height: 150px;
  }
}

/* First, let's define our breakpoints at the top */
:root {
  --breakpoint-mobile: 767px;
  --breakpoint-tablet: 1024px;
  /* Colors for Actuele Wind chart */
  --grid-line-color: #dddddd;
  --text-color: #666666;
  --base-wind-color: #dddddd;
  --gust-wind-color: #9370DB;
  --arrow-color: #333333;
}

/* Actuele Wind page */
.wind-chart-container {
  margin: 14px;
}

#wind-chart {
  border: 1px solid #ddd;
}

/* Keep your existing base styles and components */
/* ... (sections 1-7 remain the same) ... */

/* ==========================================================================
   8. Responsive Layout
   ========================================================================== */

/* Mobile First Base Layout */
.list-and-map-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 auto;
  height: 100%;
}

.left-panel {
    min-width: 0; /* Prevents content from forcing expansion */
    height: calc(100vh - 55px);
    overflow-y: auto;
}

.right-panel {
    min-width: 0; /* Prevents content from forcing expansion */
    height: calc(100vh - 55px);
}

@media (max-width: 768px) {
    .left-panel {
        display: none; /* Hidden by default on mobile */
    }

    .list-and-map-container {
        display: grid;
        grid-template-columns: 1fr;
        margin: 0 auto;
        height: 100%;
    }
}

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

/* Mobile-specific components */
.filter-toggle {
  display: block;
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
}

.filter-section {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: white;
  padding: 1rem;
  z-index: 999;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.filter-section.visible {
  transform: translateY(0);
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.bottom-sheet.visible {
  transform: translateY(0);
}

/* Tablet Layout (768px and up) */
@media (min-width: 768px) {
  .container {
    flex-direction: row;
    gap: 20px;
    margin: 0 auto;
  }

  /* Hide mobile-specific elements */
  .filter-toggle,
  .bottom-sheet {
    display: none;
  }

  .filter-section {
    position: static;
    transform: none;
  }

}

/* Adjust feedback button for different layouts */
.feedback-button {
  position: fixed;
  right: 1rem;
  z-index: 1001;
  padding: 0.5rem 1rem;
  background: white;
  border-radius: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  text-decoration: none;
  color: black;
}

@media (max-width: 767px) {
  .feedback-button {
    display: none !important; /* Use !important to override any other styles */
  }
}

@media (min-width: 768px) {
  .feedback-button {
    bottom: 1rem;
  }
}

/* Mobile styles (below 768px) */
@media screen and (max-width: 767px) { /* BREAKPOINTS.mobile - 1 */
    .bottom-sheet {
        max-height: 60vh;
        min-height: 200px;
    }

    .bottom-sheet-content {
        padding: 20px;
        max-height: calc(60vh - 40px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .bottom-sheet::before {
        content: '';
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: #ddd;
        border-radius: 2px;
    }
}

/* Filter row styling - consolidated above in section 3 */

/* Filter container styling */
.filter-container {
    flex: 1;
    display: flex;
    align-items: center;
    max-width: 200px; /* 2 filters per row on mobile */
}

/* Select styling */
.filter-container select {
    width: 100%;
    padding: 0px 8px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

/* Label styling */
.filter-container label {
    margin-right: 5px;
}

/* Search container styling */
.search-container {
    width: 100%;
}

/* Search input styling */
#searchInput {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    box-sizing: border-box;
}

/* Map container adjustments */
.map-container {
    width: 100%;
    height: calc(100vh - 200px); /* Adjust based on your header and filter height */
}

/* Close button (bottom sheet) styling */
.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 20px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 0;
}

.close-button:active {
    background: rgba(0, 0, 0, 0.9);
}

.filtered-out {
    /* For list view */
    display: none;
}

/* Ensure filtered spots are still visible in bottom sheet */
.spot-bottom-sheet .spot {
    display: block !important;
}


/* ==========================================================================
   9. Wind Indicator
   ========================================================================== */

/* Spot Side Panel (Desktop) */
.spot-side-panel {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background: white;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.side-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #eee;
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.spot-side-panel .spot-image-section {
    position: relative;
    width: 100%;
    height: 200px;
    flex-shrink: 0;
}

.spot-side-panel .spot-image-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.spot-side-panel .spot-indicators {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px;
    z-index: 2;
}

.spot-side-panel .spot-details-section {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.spot-side-panel h2 {
    color: #333;
    font-size: 1.5rem;
    margin: 0 0 8px 0;
    text-shadow: none;
}

.spot-side-panel .spot-description p {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.spot-side-panel .forecast-section {
    margin: 0;
}

.spot-side-panel .navigate-button {
    align-self: flex-start;
    margin-top: 8px;
}

/* Ensure the side panel doesn't interfere with mobile styles */
@media (max-width: 767px) {
    .spot-side-panel {
        display: none;
    }
}

.wind-indicator {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.wind-circle {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid #ffffff;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    justify-content: center;
}

.wind-direction-arc {
    position: absolute; /* Positions the arc absolutely */
    top: 0; /* Aligns the arc to the top */
    left: 0; /* Aligns the arc to the left */
    width: 100%; /* Ensures the arc covers the entire circle */
    height: 100%; /* Ensures the arc covers the entire circle */
    transform: rotate(var(--arc-rotation)); /* Rotates the arc based on the wind direction */
}

.wind-direction-arc::before {
    content: ''; /* Creates the arc */
    position: absolute; /* Positions the arc absolutely */
    top: 0; /* Aligns the arc to the top */
    left: 50%; /* Centers the arc */
    width: 100px;  /* Controls the size of the arc */
    height: 100px; /* Should match width for a circular arc */
    border: 5px solid #2ecc71; /* Green color for the arc */
    border-bottom: none; /* Removes the bottom border */
    border-left: none; /* Removes the left border */
    border-right: none; /* Removes the right border */
    border-radius: 50%; /* Makes the arc circular */
    transform-origin: bottom center; /* Sets the origin of the transformation to the bottom center */
    transform: translateX(-50%) rotate(-5deg); /* Rotates the arc to proper position */
    clip-path: polygon(50% 0, 90% 0, 90% 100%, 50% 100%); /* Creates the arc segment */
}


/* Wind arrow styling */
.wind-arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: 
        translate(-50%, -50%)
        rotate(var(--wind-direction))
        translateY(-40px)
        rotate(180deg);
    transform-origin: center;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 16px solid white;
}

.wind-speed {
    position: relative;
    z-index: 3;
    font-size: 14px;
    padding: 15px;
    text-align: center;
    line-height: 1.2;
    color: white;
}

.primary-speed {
    font-size: 24px;
    font-weight: bold;
    display: block;
}

.gust-speed {
    font-size: 12px;
    opacity: 0.8;
    color: white;
}

.units {
    font-size: 12px;
    color: white;
    display: block;
}

.kitespot-image-container-bottom-sheet {
    position: relative;
    width: 100%;
}

.kitespot-image-container {
    position: relative;
    width: 100%;
}


.wind-indicator-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    border-radius: 50%;
    padding: 10px;
}

.wind-speed {
    position: relative;
    z-index: 3;
    font-size: 14px;
    padding: 15px;
}

.gust-speed {
    font-size: 12px;
    opacity: 0.8;
}

.units {
    font-size: 12px;
    display: block;
}

/* Ensure the container has proper positioning context */
.kitespot-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

/* Ensure the image doesn't overlap the indicators */
.kitespot-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Add new text container */
.kitespot-text-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    width: 80%; 
    gap: 10px;
    padding: 10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: stretch;
}

.list-item-h2 {
    font-size: 1.2em;
    font-weight: 500;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    margin-bottom: 5px;
}

.other-elements {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

/* Update existing spot-indicators section */
.spot-indicators {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    font-weight: 200;
    padding: 2px;
}

/* Update existing working-indicator section */
.working-indicator {
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;    
    color: rgb(53 53 53);
    width: fit-content;
    font-size: 12px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffffb7;
}

.working-indicator.working {
    background-color: #5FCF7C;
}

.working-indicator.not-working {
    background-color: #ffffffb7;
}

.spot-type, .spot-level {
    background-color: #f5f5f5;
    padding: 4px 10px;    /* Reduce padding to make pills more compact */
    border-radius: 16px;  /* Slightly smaller radius */
    line-height: 1rem !important;  /* Reduce line height */
    font-size: 0.75rem !important;  /* Make font slightly smaller */
    color: #333;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
}

/* Marker Cluster Base Styles */
.marker-cluster {
    background-clip: padding-box;
    border-radius: 20px;
    width: auto;
    min-width: 180px;
}

.marker-cluster div {
    position: relative;
    width: auto;
    min-width: fit-content;
    height: 50px;
    margin-left: -50%;
    margin-top: -50%;
    padding: 8px 16px;
    text-align: center;
    border-radius: 20px;
    border: 2px solid darkgray;
    font-size: 16px;
    font-weight: 500;
    color: rgb(53 53 53);
    line-height: 20px;
    background-color: #ffffffb7;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.cluster-text {
    font-size: 16px;
    font-weight: 500;
    color: rgb(53 53 53);
}

/* All spots working (green) */
.marker-cluster.all-working div {
    background-color: #3edf68b0;
    border: 2px solid darkgray;
}

/* No spots working (default style) */
.marker-cluster.none-working div {
    background-color: #ffffffb7;
    border: 2px solid darkgray;
}

/* Some spots working (gradient applied via inline style for better compatibility) */
.marker-cluster.some-working div {
    background-color: unset;
    border: 2px solid darkgray;
}

.nav-arrow {
    /* background: rgba(0, 0, 0, 0.5); */
    color: #393939;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.2s;
    min-width: 30px;
    min-height: 30px;
    padding: 0;
    line-height: 1;
}

/* .nav-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
} */

/* .nav-arrow:focus {
    outline: none;
    background-color: initial;
} */

.nav-arrow:active {
    background-color: transparent !important;
}

.nav-arrow.left {
    left: 10px;
}

.nav-arrow.right {
    right: 10px;
}

.kitespot-image-container {
    position: relative;
}

.description-overlay {
    position: absolute;
    border-radius: 10px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px;
    font-size: 0.8em;
    overflow-y: auto;
    z-index: 10;
}

/* Make the selector more specific by targeting the container class */
.kitespot-text-container h2 {
    display: block;
    font-size: 1.2em;
    margin: 0;
    padding: 0;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;  /* Ensure text doesn't overflow */
    text-overflow: ellipsis;  /* Add ellipsis for overflow */
    color: white;   
    max-width: 100%;  /* Ensure it doesn't exceed container width */
}

/* Full-page spot overlay */
.full-page-spot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 1001;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    overflow-y: auto;
}

.full-page-spot-overlay.visible {
    transform: translateY(0);
}

.full-page-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    z-index: 1;
    border-bottom: 1px solid #eee;
}

.full-page-header .filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    height: 50px;
}

.back-button {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.spot-image-section {
    position: relative;
    width: 100%;
    height: 180px;
}

.spot-image-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.spot-details-section {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Full page spot overlay-specific styles */

.full-page-spot-overlay .kitespot-image {
    border-radius: 0;  /* Override the default border-radius */
}

.full-page-spot-overlay h2 {
    color: black;  /* Override the white color */
    text-shadow: none;  /* Remove text shadow */
    padding: 4px;  /* Add some padding */
    margin: 0;  /* Reset margins */
    font-size: 1em;  /* Slightly larger font size */
}

.full-page-spot-overlay .spot-indicators {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px;
    position: absolute;
    top: 10px !important;
    left: 10px !important;;
}

.full-page-spot-overlay .spot-type,
.full-page-spot-overlay .spot-level {
    background-color: #f5f5f5;  /* Light gray background */
    padding: 4px 12px;    
    border-radius: 16px;
    line-height: 1.125rem !important;
    font-size: 0.875rem !important;
    color: #333;  /* Darker text color */
    box-shadow: none;  /* Remove any existing shadow */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
}

/* .full-page-spot-overlay .working-indicator {
}

.full-page-spot-overlay .not-working-indicator {
} */

.full-page-spot-overlay p {
    color: #333;
    font-size: 0.875rem !important;
    line-height: 1.5;
    padding: 4px;
    margin: 0;
}

/* Map Styling */
.leaflet-container {
    background-color: #f8f9fa;
}

/* Simplify map controls */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.leaflet-control-zoom a {
    background-color: white !important;
    color: #666 !important;
    border: none !important;
}

/* Remove map attribution background */
.leaflet-control-attribution {
    background-color: transparent !important;
    color: #999 !important;
    font-size: 10px !important;
}

/* Forecast Table Styling */

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
  }
  
  h1 {
    text-align: center;
  }
  
  .forecast-container {
    width: 80%;
    margin: 0 auto;
    margin-top: 20px;
  }
  
  table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    font-size: 0.7em;
  }
  
  th, td {
    padding: 2px;
    text-align: center;
    border: 1px solid #ffffff;
  }
  
  th {
    background-color: #f0f0f0;
  }
  
  .wind-speed, .wind-gusts {
    font-weight: bold;
    transition: background-color 0.3s ease-in-out; /* Smooth transition */
  }
  
  td.wind-direction-cell {
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
  }
  
  .wind-direction {
    display: inline-block;
    transform: rotate(var(--rotation));
    position: relative;
    width: 2px;
    height: 20px;
  }
  
  .wind-direction::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 8px solid #333;
  }
  
  .wind-direction::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 14px;
    background-color: #333;
  }

  .recent-icon {
    color: #666;
    font-style: normal;
    font-size: 0.9em;
  }
  
  .suggestions-list li.recent-item {
    background-color: #f8f8f8;
  }
  
  .suggestions-list li.recent-item:hover {
    background-color: #f0f0f0;
  }
  
  .forecast-section {
    margin: 0px;
  }
  
  .forecast-scroll-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    /* padding: 0 20px;
    margin: 0 -20px; */
  }
  
  .forecast-table-container {
    /* padding: 0 20px; */
    min-width: 100%;
    width: max-content;
  }
  
  .forecast-table {
    border-collapse: collapse;
    white-space: nowrap;
  }
  
  .forecast-table th {
    position: sticky;
    left: 0;
    background-color: white;
    z-index: 1;
  }
  
  /* Optional: Style the scrollbar */
  .forecast-scroll-container::-webkit-scrollbar {
    height: 6px;
  }
  
  .forecast-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
  }
  
  .forecast-scroll-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
  }
  
  .forecast-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #555;
  }
  
  
.direction-arc {
    fill: #5296D5;  /* Default blue color */
}

.direction-arc.working {
    fill: #5FCF7C;  /* Green color when working */
}
  
/* Precipitation cell styling */
td.precipitation-none {
    background-color: transparent;
}

td.precipitation-very-light {
    background-color: #F8F8FF;  /* Almost white */
}

td.precipitation-light {
    background-color: #E6E6FF;  /* Very light blue */
}

td.precipitation-medium {
    background-color: #CCCCFF;  /* Light blue */
}

td.precipitation-heavy {
    background-color: #9999FF;  /* Medium blue */
}

td.precipitation-very-heavy {
    background-color: #6666FF;  /* Blue */
}

/* Working cell styling */
td.working-cell {
    background-color: #5FCF7C;  /* Green when spot is working */
}

td.not-working-cell {
    background-color: #ffffffb7;  /* White/transparent when not working */
}
  
/* Temperature cell styling */
td.temperature-freezing {
    background-color: #F8F8F8;  /* Very light gray for <= 0°C */
}

td.temperature-very-cold {
    background-color: #FFF7E6;  /* Very light orange for <= 10°C */
}

td.temperature-cold {
    background-color: #FFEDA6;  /* Light orange for <= 15°C */
}

td.temperature-mild {
    background-color: #FFE066;  /* Mild orange for <= 20°C */
}

td.temperature-warm {
    background-color: #FFB366;  /* Warm orange for <= 25°C */
}

td.temperature-hot {
    background-color: #FF8533;  /* Hot orange for <= 30°C */
}

td.temperature-very-hot {
    background-color: #FF5500;  /* Very hot orange for > 30°C */
}
  
  
/* Add these styles to your existing CSS */

.favorite-button {
    background: #F5F5F5;  /* Light grey background for non-favorite state */
    border: none;
    position: absolute;
    right: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.favorite-button:hover {
    transform: scale(1.02);
    background: #EBEBEB;  /* Slightly darker on hover */
}

.favorite-button .star-icon {
    fill: #cccccc;
    stroke: #666666;
    stroke-width: 1px;
    transition: fill 0.2s ease;
    width: 16px;
    height: 16px;
}

.favorite-button.active {
    background: #FFF8E1;  /* Light yellow background for favorite state */
}

.favorite-button.active:hover {
    background: #FFE9B3;  /* Slightly darker yellow on hover */
}

.favorite-button.active .star-icon {
    fill: #FFD700;
    stroke: #FFA500;
}

.favorite-text {
    font-size: 14px;
    color: #666666;
    white-space: nowrap;
}

.favorite-button.active .favorite-text {
    color: #B7950B;  /* Darker yellow text for favorite state */
}

/* Position the favorite button in the header */
.full-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Hamburger Menu Styles - moved to hamburger-menu.css */

/* Adjust filter row to accommodate hamburger menu - consolidated above in section 3 */

/* Add new marker star styles */
.marker-star {
    color: #FFD700;
    margin-left: 4px;
    font-size: 0.9em;
    text-shadow: 0 0 10px rgb(0 0 0 / 25%);
}
  
/* Suggestions dropdown styling for spot search */
.suggestions-list {
  position: absolute;
  font-size: 14px;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: #fff;
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  max-height: 150px;
  overflow-y: auto;
}

.suggestions-list li {
  padding: 8px 24px;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

.suggestions-list li:hover {
  background-color: #f0f0f0;
}
  
/* ===================================
   Skeleton Loading Screens
   =================================== */
.spot-skeleton {
    background: #fff;
    border-radius: 8px;
    padding: 0;
    margin-bottom: 16px;
    overflow: hidden;
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    border-radius: 8px 8px 0 0;
    margin-bottom: 12px;
}

.skeleton-text {
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    border-radius: 4px;
    margin: 0 16px 12px;
}

.skeleton-text.short {
    width: 60%;
    margin-bottom: 16px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Mobile responsive adjustments for skeletons */
@media (max-width: 768px) {
    .skeleton-image {
        height: 150px;
    }
}

/* Wind toggle button */
.wind-toggle-button {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #666;
    margin-left: auto;
    margin-right: 12px;
}

.wind-toggle-button:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

.wind-toggle-button.active {
    background: #3edf68;
    border-color: #3edf68;
    color: white;
}

.wind-toggle-button.active:hover {
    background: #35c75a;
    border-color: #35c75a;
}

@media (max-width: 768px) {
    .wind-toggle-button {
        padding: 6px;
        margin-right: 8px;
    }
    
    .wind-toggle-button svg {
        width: 18px;
        height: 18px;
    }
}
