/* ============================================
   FAIRWAY WEATHER APP - STYLES (Light Theme)
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f8fafc;
  color: #1e293b;
}

.app-container {
  display: flex;
  height: 100%;
  width: 100%;
}

/* ============================================
   MAP CONTAINER
   ============================================ */

.map-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-width: 300px;
}

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

/* ============================================
   RESIZER (Desktop)
   ============================================ */

.resizer {
  width: 8px;
  background: #e2e8f0;
  cursor: col-resize;
  flex-shrink: 0;
  transition: background 0.2s;
  position: relative;
  z-index: 10;
}

.resizer:hover,
.resizer.active {
  background: #10b981;
}

.resizer::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 40px;
  background: #94a3b8;
  border-radius: 2px;
}

.resizer:hover::after,
.resizer.active::after {
  background: white;
}

/* ============================================
   SWIPE HANDLE (Mobile)
   ============================================ */

.swipe-handle {
  display: none;
  width: 100%;
  padding: 10px 0 6px;
  cursor: grab;
  touch-action: none;
}

.swipe-handle:active {
  cursor: grabbing;
}

.swipe-indicator {
  width: 40px;
  height: 5px;
  background: #cbd5e1;
  border-radius: 3px;
  margin: 0 auto;
  transition: background 0.2s, width 0.2s;
}

.swipe-handle:hover .swipe-indicator,
.sidebar.dragging .swipe-indicator {
  background: #10b981;
  width: 50px;
}

/* ============================================
   CLUSTER STYLES (immer grün)
   ============================================ */

.marker-cluster {
  background: rgba(16, 185, 129, 0.2) !important;
  border-radius: 50%;
}

.marker-cluster div {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: white !important;
  font-weight: 600;
  font-size: 12px;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  margin: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background: rgba(16, 185, 129, 0.2) !important;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

/* ============================================
   GOLF MARKER STYLES (Score-basierte Farben)
   ============================================ */

.golf-marker-icon {
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  will-change: transform;
}

.golf-marker-icon.score-excellent {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.golf-marker-icon.score-good {
  background: linear-gradient(135deg, #84cc16 0%, #65a30d 100%);
}

.golf-marker-icon.score-moderate {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.golf-marker-icon.score-poor {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.golf-marker-icon:hover {
  transform: scale(1.15);
}

.golf-marker-icon.score-excellent:hover {
  box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.golf-marker-icon.score-good:hover {
  box-shadow: 0 5px 15px rgba(132, 204, 22, 0.4);
}

.golf-marker-icon.score-moderate:hover {
  box-shadow: 0 5px 15px rgba(245, 158, 11, 0.4);
}

.golf-marker-icon.score-poor:hover {
  box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4);
}

.golf-marker-icon.selected {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  box-shadow: 0 5px 20px rgba(59, 130, 246, 0.4);
  transform: scale(1.2);
}

.golf-marker-icon::after {
  content: '';
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
}

/* User Location Marker */
.user-location-icon {
  background: #3b82f6;
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.2), 0 3px 10px rgba(0, 0, 0, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4), 0 3px 10px rgba(0, 0, 0, 0.3); }
  70% { box-shadow: 0 0 0 15px rgba(59, 130, 246, 0), 0 3px 10px rgba(0, 0, 0, 0.3); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0), 0 3px 10px rgba(0, 0, 0, 0.3); }
}

/* Leaflet Popup Styling */
.leaflet-popup-content-wrapper {
  background: white;
  color: #1e293b;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
  margin: 14px 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.leaflet-popup-tip {
  background: white;
}

.popup-club-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: #1e293b;
}

.popup-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  transition: opacity 0.2s;
}

.popup-btn:hover {
  opacity: 0.9;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
  width: 400px;
  min-width: 280px;
  max-width: 600px;
  height: 100%;
  background: white;
  border-left: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

/* ============================================
   LOGO
   ============================================ */

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  color: white;
  flex-shrink: 0;
}

.logo-icon svg {
  width: 22px;
  height: 22px;
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1e293b;
}

.logo-text span {
  color: #10b981;
}

/* ============================================
   LOCATION SECTION
   ============================================ */

.location-section {
  margin-bottom: 8px;
}

.location-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.plz-input-container {
  display: flex;
  flex: 1;
  min-width: 0;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.plz-input-container:focus-within {
  border-color: #10b981;
}

#plzInput {
  flex: 1;
  padding: 10px 12px;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  color: #1e293b;
  outline: none;
  min-width: 0;
}

#plzInput::placeholder {
  color: #94a3b8;
}

.icon-btn {
  padding: 10px 12px;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-btn:hover {
  color: #10b981;
  background: #f0fdf4;
}

.location-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: #f0fdf4;
  border: 1px solid #10b981;
  border-radius: 10px;
  color: #059669;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.location-btn:hover {
  background: #10b981;
  color: white;
}

.location-btn.loading {
  opacity: 0.7;
  pointer-events: none;
}

.location-btn svg {
  flex-shrink: 0;
}

.location-status {
  margin-top: 4px;
  font-size: 0.75rem;
  color: #64748b;
  min-height: 16px;
}

.location-status.error {
  color: #ef4444;
}

.location-status.success {
  color: #10b981;
}

/* ============================================
   DROPDOWN SECTION
   ============================================ */

.dropdown-section {
  position: relative;
}

.dropdown-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.dropdown-container {
  flex: 1;
  position: relative;
  min-width: 0;
}

.dropdown-trigger {
  width: 100%;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  color: #1e293b;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s;
}

.dropdown-trigger:hover {
  border-color: #10b981;
}

.dropdown-trigger.active {
  border-color: #10b981;
  border-radius: 10px 10px 0 0;
}

.dropdown-arrow {
  transition: transform 0.2s;
  color: #64748b;
  flex-shrink: 0;
}

.dropdown-trigger.active .dropdown-arrow {
  transform: rotate(180deg);
}

#dropdownLabel {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #10b981;
  border-top: none;
  border-radius: 0 0 10px 10px;
  max-height: 280px;
  overflow-y: auto;
  display: none;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dropdown-menu.open {
  display: block;
}

.dropdown-item {
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.85rem;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dropdown-item:hover {
  background: #f0fdf4;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-item .favorite-btn {
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: #cbd5e1;
  transition: color 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dropdown-item .favorite-btn:hover {
  color: #fbbf24;
  transform: scale(1.1);
}

.dropdown-item .favorite-btn.active {
  color: #fbbf24;
}

.dropdown-item .favorite-btn svg {
  width: 18px;
  height: 18px;
}

.dropdown-item .favorite-btn.active svg {
  fill: #fbbf24;
}

.dropdown-info {
  margin-top: 6px;
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
}

.dropdown-empty {
  padding: 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
}

/* Favorites Filter Checkbox */
.favorites-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.favorites-filter:hover {
  border-color: #fbbf24;
  background: #fffbeb;
}

.favorites-filter input {
  display: none;
}

.favorites-filter .star-icon {
  color: #cbd5e1;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: all 0.2s;
}

.favorites-filter:hover .star-icon {
  color: #fbbf24;
}

.favorites-filter input:checked + .star-icon {
  color: #fbbf24;
  fill: #fbbf24;
}

/* ============================================
   FORECAST
   ============================================ */

.forecast-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f8fafc;
}

.forecast-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #64748b;
  padding: 30px;
}

.forecast-placeholder svg {
  width: 60px;
  height: 60px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.forecast-placeholder p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.loading {
  text-align: center;
  padding: 30px;
  color: #64748b;
}

.selected-club {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.selected-club-name {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
}

/* ============================================
   DAY CARDS
   ============================================ */

.day-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.day-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.day-header {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  gap: 10px;
}

.day-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.day-score {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: white;
  flex-shrink: 0;
}

.score-excellent { background: linear-gradient(135deg, #10b981, #059669); }
.score-good { background: linear-gradient(135deg, #84cc16, #65a30d); }
.score-moderate { background: linear-gradient(135deg, #f59e0b, #d97706); }
.score-poor { background: linear-gradient(135deg, #ef4444, #dc2626); }

.day-date {
  font-weight: 600;
  margin-bottom: 2px;
  color: #1e293b;
  font-size: 0.9rem;
}

.day-sun {
  font-size: 0.75rem;
  color: #64748b;
  display: flex;
  gap: 8px;
}

.day-best {
  text-align: right;
  flex-shrink: 0;
}

.day-best-label {
  font-size: 0.7rem;
  color: #10b981;
  margin-bottom: 2px;
  font-weight: 500;
}

.day-best-time {
  font-size: 0.8rem;
  font-weight: 500;
  color: #1e293b;
}

/* ============================================
   TIME SLOTS
   ============================================ */

.time-slots {
  padding: 0 14px 14px;
  display: none;
}

.time-slots.open {
  display: block;
}

.time-slot {
  display: flex;
  align-items: center;
  padding: 10px;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 6px;
  gap: 10px;
}

.time-slot:last-child {
  margin-bottom: 0;
}

.slot-score {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8rem;
  color: white;
  flex-shrink: 0;
}

.slot-period {
  min-width: 80px;
}

.slot-period-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: #1e293b;
}

.slot-period-time {
  font-size: 0.65rem;
  color: #64748b;
  margin-top: 1px;
}

.slot-details {
  flex: 1;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.slot-detail {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.75rem;
  color: #475569;
}

/* ============================================
   LEGEND
   ============================================ */

.legend {
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  background: white;
  flex-shrink: 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: #64748b;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ============================================
   DISABLE TEXT SELECTION WHILE RESIZING/DRAGGING
   ============================================ */

body.resizing,
body.sidebar-dragging {
  user-select: none;
}

body.resizing,
body.resizing * {
  cursor: col-resize !important;
}

body.resizing iframe,
body.sidebar-dragging iframe {
  pointer-events: none;
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */

@media (max-width: 1024px) {
  .sidebar {
    width: 350px;
    min-width: 280px;
  }
  
  .location-btn-text {
    display: none;
  }
  
  .location-btn {
    padding: 10px;
  }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
    position: relative;
  }

  .map-container {
    flex: 1;
    min-height: 0;
  }

  .resizer {
    display: none !important;
  }

  .sidebar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100% !important;
    max-width: none;
    min-width: auto;
    height: 55vh;
    min-height: 120px;
    max-height: 85vh;
    border-left: none;
    border-top: 1px solid #e2e8f0;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    transition: height 0.3s ease;
    z-index: 1000;
  }
  
  .sidebar.minimized {
    height: 120px;
  }
  
  .sidebar.expanded {
    height: 85vh;
  }
  
  .sidebar.dragging {
    transition: none;
  }
  
  .swipe-handle {
    display: block;
  }
  
  .sidebar-header {
    padding: 10px 16px 14px;
  }
  
  .logo {
    margin-bottom: 10px;
  }
  
  .logo-icon {
    width: 36px;
    height: 36px;
  }
  
  .logo-icon svg {
    width: 20px;
    height: 20px;
  }
  
  .logo-text {
    font-size: 1.2rem;
  }
  
  .location-section {
    margin-bottom: 6px;
  }
  
  .location-row {
    gap: 6px;
  }
  
  #plzInput {
    padding: 8px 10px;
    font-size: 0.85rem;
  }
  
  .icon-btn {
    padding: 8px 10px;
  }
  
  .location-btn {
    padding: 8px 10px;
  }
  
  .location-btn-text {
    display: none;
  }
  
  .dropdown-trigger {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
  
  .favorites-filter {
    width: 40px;
    height: 40px;
  }
  
  .forecast-container {
    padding: 12px;
  }
  
  .forecast-placeholder {
    padding: 20px;
  }
  
  .forecast-placeholder svg {
    width: 50px;
    height: 50px;
  }
  
  .forecast-placeholder p {
    font-size: 0.85rem;
  }
  
  .day-header {
    padding: 10px 12px;
  }
  
  .day-score {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }
  
  .day-date {
    font-size: 0.85rem;
  }
  
  .day-sun {
    font-size: 0.7rem;
  }
  
  .time-slots {
    padding: 0 12px 12px;
  }
  
  .time-slot {
    padding: 8px;
    flex-wrap: wrap;
  }
  
  .slot-details {
    width: 100%;
    justify-content: flex-start;
    margin-top: 6px;
    padding-left: 44px;
  }
  
  .legend {
    padding: 10px 12px;
    gap: 8px;
  }
  
  .legend-item {
    font-size: 0.65rem;
  }
}

/* ============================================
   RESPONSIVE - SMALL MOBILE
   ============================================ */

@media (max-width: 380px) {
  .sidebar-header {
    padding: 8px 12px 12px;
  }
  
  .logo-text {
    font-size: 1.1rem;
  }
  
  .forecast-container {
    padding: 10px;
  }
  
  .day-card {
    border-radius: 10px;
  }
  
  .slot-details {
    padding-left: 0;
  }
}

/* ============================================
   DAYLIGHT INDICATOR
   ============================================ */

.time-slot.low-daylight {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 1px dashed #cbd5e1;
}

.time-slot.low-daylight .slot-period-name {
  color: #64748b;
}

/* ============================================
   SLOT DETAILS 2x2 GRID
   ============================================ */

.slot-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 12px;
  flex: 1;
  justify-items: end;
}

.slot-detail {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.75rem;
  color: #475569;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .time-slot {
    flex-wrap: nowrap;
  }
  
  .slot-details {
    width: auto;
    margin-top: 0;
    padding-left: 0;
    grid-template-columns: repeat(2, auto);
    gap: 4px 10px;
  }
}

@media (max-width: 380px) {
  .slot-details {
    gap: 3px 8px;
    font-size: 0.7rem;
  }
}

/* ============================================
   RAIN CHART (Fixed)
   ============================================ */

.rain-chart {
  padding: 10px 14px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.rain-chart-label {
  font-size: 0.7rem;
  color: #64748b;
  margin-bottom: 6px;
}

.rain-chart-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rain-bars {
  display: flex;
  align-items: flex-end;
  height: 40px;
  gap: 2px;
  background: linear-gradient(to top, #f1f5f9 0%, transparent 100%);
  border-radius: 4px;
  padding: 2px;
}

.rain-bar {
  flex: 1;
  min-width: 0;
  background: #dbeafe;
  border-radius: 2px 2px 0 0;
  position: relative;
  cursor: pointer;
  transition: opacity 0.2s;
}

.rain-bar:hover {
  opacity: 0.8;
}

.rain-bar::after {
  content: attr(data-value);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.55rem;
  color: #64748b;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.rain-bar:hover::after {
  opacity: 1;
}

.rain-chart-axis {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  color: #94a3b8;
  padding: 0 2px;
}

@media (max-width: 768px) {
  .rain-chart {
    padding: 8px 12px;
  }
  
  .rain-bars {
    height: 35px;
  }
}

/* ============================================
   RAIN CHART (inside expandable area)
   ============================================ */

.rain-chart {
  padding: 12px 0;
  margin-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.rain-chart-label {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 8px;
  font-weight: 500;
}

.rain-chart-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rain-bars {
  display: flex;
  align-items: flex-end;
  height: 50px;
  gap: 2px;
  background: linear-gradient(to top, #f1f5f9 0%, transparent 100%);
  border-radius: 4px;
  padding: 4px;
}

.rain-bar {
  flex: 1;
  min-width: 0;
  border-radius: 2px 2px 0 0;
  position: relative;
  cursor: pointer;
  transition: opacity 0.2s;
}

.rain-bar:hover {
  opacity: 0.7;
}

.rain-bar::after {
  content: attr(data-value);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  color: #3b82f6;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  padding-bottom: 2px;
}

.rain-bar:hover::after {
  opacity: 1;
}

.rain-chart-axis {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: #94a3b8;
  padding: 0 4px;
}

@media (max-width: 768px) {
  .rain-chart {
    padding: 10px 0;
  }
  
  .rain-bars {
    height: 45px;
  }
}

/* ============================================
   RAIN CHART (same style as time slots)
   ============================================ */

.rain-chart {
  display: flex;
  align-items: center;
  padding: 10px;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 6px;
  gap: 10px;
}

.rain-chart-label {
  font-size: 0.8rem;
  color: #1e293b;
  font-weight: 500;
  min-width: 80px;
  flex-shrink: 0;
}

.rain-chart-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rain-bars {
  display: flex;
  align-items: flex-end;
  height: 40px;
  gap: 2px;
  background: linear-gradient(to top, #e2e8f0 0%, transparent 100%);
  border-radius: 4px;
  padding: 3px;
}

.rain-bar {
  flex: 1;
  min-width: 0;
  border-radius: 2px 2px 0 0;
  position: relative;
  cursor: pointer;
  transition: opacity 0.2s;
}

.rain-bar:hover {
  opacity: 0.7;
}

.rain-bar::after {
  content: attr(data-value);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  color: #3b82f6;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  padding-bottom: 2px;
}

.rain-bar:hover::after {
  opacity: 1;
}

.rain-chart-axis {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  color: #94a3b8;
  padding: 0 2px;
}

@media (max-width: 768px) {
  .rain-chart {
    padding: 8px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  
  .rain-chart-label {
    min-width: auto;
  }
  
  .rain-chart-container {
    width: 100%;
  }
  
  .rain-bars {
    height: 35px;
  }
}

/* ============================================
   RAIN CHART - Label ÜBER Diagramm (Override)
   ============================================ */

.rain-chart {
  display: block !important;
  flex-direction: unset !important;
  align-items: unset !important;
  padding: 10px;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 6px;
}

.rain-chart-label {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 8px;
  min-width: unset !important;
}

.rain-chart-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rain-bars {
  display: flex;
  align-items: flex-end;
  height: 40px;
  gap: 2px;
  background: linear-gradient(to top, #e2e8f0 0%, transparent 100%);
  border-radius: 4px;
  padding: 3px;
}

.rain-chart-axis {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  color: #94a3b8;
  padding: 0 2px;
}

@media (max-width: 768px) {
  .rain-chart {
    padding: 8px;
  }
  
  .rain-bars {
    height: 35px;
  }
  
  .rain-chart-label {
    margin-bottom: 6px;
  }
}

/* ============================================
   SIDEBAR - Max-Width begrenzen (Override)
   ============================================ */

.sidebar {
  max-width: 420px !important;
}

/* ============================================
   SLOT DETAILS - Links-Alignment im 2x2 Grid
   ============================================ */

.slot-details {
  display: grid !important;
  grid-template-columns: repeat(2, auto) !important;
  gap: 4px 16px !important;
  justify-content: end !important;
  justify-items: start !important;
}

.slot-detail {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-size: 0.75rem !important;
  color: #475569 !important;
  white-space: nowrap !important;
  text-align: left !important;
}

/* ============================================
   MOBILE - Slot Details rechts, Icons links
   ============================================ */

@media (max-width: 768px) {
  .time-slot {
    display: flex !important;
    flex-wrap: wrap !important;
  }
  
  .slot-details {
    width: auto !important;
    margin-left: auto !important;
    margin-top: 8px !important;
    padding-left: 0 !important;
    grid-template-columns: repeat(2, auto) !important;
    gap: 4px 12px !important;
    justify-content: end !important;
    justify-items: start !important;
  }
}

@media (max-width: 380px) {
  .slot-details {
    gap: 3px 10px !important;
  }
  
  .slot-detail {
    font-size: 0.7rem !important;
  }
}
