/* Tab-Navigation */
.aei-view-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.aei-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: #666;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.aei-tab:hover {
  color: #0073aa;
  background: #f8f9fa;
}

.aei-tab.active {
  color: #0073aa;
  border-bottom-color: #0073aa;
}

.aei-tab svg {
  flex-shrink: 0;
}

/* Views */
.aei-view {
  display: none;
}

.aei-view.active {
  display: block;
}

/* Map */
#aei-map-view {
  position: relative;
}

.aei-map {
  width: 100%;
  height: 600px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.aei-map-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  border-radius: 8px;
}

.aei-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #0073aa;
  border-radius: 50%;
  animation: aei-spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes aei-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.aei-map-loading p {
  margin: 0;
  font-size: 16px;
  color: #666;
  font-weight: 500;
}

/* Map Popup */
.aei-map-popup h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.aei-popup-badge {
  display: inline-block;
  padding: 4px 10px;
  background: #0073aa;
  color: white;
  font-size: 12px;
  border-radius: 4px;
  margin-bottom: 8px;
  font-weight: 500;
}

.aei-popup-location {
  font-size: 14px;
  color: #666;
  margin-bottom: 6px;
}

.aei-popup-date {
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
}

.aei-popup-price {
  font-size: 15px;
  font-weight: 600;
  color: #0073aa;
  margin: 10px 0;
}

.aei-popup-details {
  width: 100%;
  padding: 8px 16px;
  background: #0073aa;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}

.aei-popup-details:hover {
  background: #005177;
}

.leaflet-popup-content {
  margin: 12px;
  min-width: 200px;
}

/* Filter */
.aei-filters {
  background: #f8f9fa;
  padding: 30px;
  margin-bottom: 40px;
  border-radius: 8px;
}

.aei-filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  align-items: center;
}

.aei-select,
.aei-input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.aei-age-slider {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 200px;
}

.aei-age-slider label {
  font-size: 14px;
  font-weight: 500;
}

/* Dual Range Slider */
.aei-dual-slider {
  position: relative;
  height: 40px;
  display: flex;
  align-items: center;
}

.aei-slider-track {
  position: absolute;
  width: 100%;
  height: 6px;
  background: #ddd;
  border-radius: 3px;
  top: 50%;
  transform: translateY(-50%);
}

.aei-slider-range {
  position: absolute;
  height: 6px;
  background: #0073aa;
  border-radius: 3px;
  left: 0;
  width: 100%;
}

.aei-range-input {
  position: absolute;
  width: 100%;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  outline: none;
}

.aei-range-input::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0073aa;
  cursor: pointer;
  pointer-events: all;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.aei-range-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0073aa;
  cursor: pointer;
  pointer-events: all;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.aei-range-input::-webkit-slider-thumb:hover {
  background: #005177;
}

.aei-range-input::-moz-range-thumb:hover {
  background: #005177;
}

.aei-btn-reset {
  padding: 10px 20px;
  background: #0073aa;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
  transition: all 0.2s;
}

.aei-btn-reset:hover {
  background: #005a87;
}

.aei-btn-reset.inactive {
  background: #e0e0e0;
  color: #999;
  cursor: default;
  opacity: 0.5;
}

.aei-btn-reset.inactive:hover {
  background: #e0e0e0;
  color: #999;
}

/* Grid */
.aei-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.aei-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  font-size: 18px;
  color: #666;
  line-height: 1.6;
}

@media (min-width: 1200px) {
  .aei-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.aei-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.aei-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.aei-card-image-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.aei-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aei-card-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.aei-card-body {
  padding: 20px;
}

.aei-card-date {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}

.aei-card-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 12px;
  color: #333;
  line-height: 1.3;
}

.aei-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.aei-badge-overlay {
  position: absolute;
  bottom: 20px;
  left: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 1;
}

.badge-ferienreise {
  background: #1976d2;
  color: white;
}

.badge-sprachreise {
  background: #7b1fa2;
  color: white;
}

.aei-card-location {
  font-size: 14px;
  color: #555;
  margin-bottom: 12px;
  padding-left: 22px;
  background-image: url('data:image/svg+xml;utf8,<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.3333 13C12.3562 13.2098 13 13.5147 13 13.8541C13 14.487 10.7614 15 8 15C5.23858 15 3 14.487 3 13.8541C3 13.5147 3.64375 13.2098 4.66667 13" stroke="black" stroke-linecap="round"/><path d="M8 0.5C10.448 0.5 12.4998 2.66358 12.5 5.41895C12.5 6.06242 12.2597 6.89651 11.8496 7.81934C11.4441 8.73164 10.8929 9.68674 10.3174 10.5566C9.74227 11.4258 9.15038 12.1994 8.66895 12.751C8.4271 13.028 8.22042 13.2412 8.06348 13.3799C8.04067 13.4 8.01901 13.4169 8 13.4326C7.98099 13.4169 7.95933 13.4 7.93652 13.3799C7.77958 13.2412 7.5729 13.028 7.33105 12.751C6.84962 12.1994 6.25773 11.4258 5.68262 10.5566C5.10705 9.68674 4.55585 8.73164 4.15039 7.81934C3.74028 6.89651 3.5 6.06242 3.5 5.41895C3.5002 2.66358 5.55199 0.5 8 0.5Z" stroke="black"/><circle cx="8" cy="5" r="2.5" stroke="black"/></svg>');
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 16px 16px;
}

.aei-card-price {
  font-size: 18px;
  font-weight: 700;
  color: #0073aa;
}

.aei-no-results {
  text-align: center;
  padding: 60px 20px;
  font-size: 16px;
  color: #666;
}

/* Pagination */
.aei-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.aei-page-btn {
  padding: 8px 14px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.aei-page-btn:hover {
  background: #f5f5f5;
}

.aei-page-btn.active {
  background: #0073aa;
  color: white;
  border-color: #0073aa;
}

.aei-page-dots {
  padding: 0 4px;
  color: #999;
}

/* Modal */
.aei-modal {
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
}

.aei-modal-content {
  background-color: #fff;
  margin: 40px auto;
  padding: 0;
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.aei-modal-close {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 32px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
  z-index: 1;
  background: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s;
}

.aei-modal-close:hover {
  color: #000;
  background: #f0f0f0;
}

.aei-modal-inner {
  padding: 0;
}

.aei-modal-padding {
  padding: 40px;
}

.aei-modal-image {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  display: block;
}

.aei-modal-inner h2 {
  margin: 0 0 20px;
  font-size: 28px;
  color: #333;
}

.aei-modal-description {
  margin-bottom: 30px;
  line-height: 1.6;
  color: #555;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.aei-modal-details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 24px;
  margin-bottom: 30px;
}

.aei-modal-details dt {
  font-weight: 600;
  color: #333;
}

.aei-modal-details dd {
  margin: 0;
  color: #555;
}

.aei-modal-details dd a {
  color: #0073aa;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.aei-modal-details dd a:hover {
  color: #005177;
  text-decoration: underline;
}

.aei-btn-book {
  display: inline-block;
  padding: 12px 30px;
  background: #f68700;
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  transition: background 0.2s;
}

.aei-btn-book:hover {
  background: #d67500;
}

/* Responsive */
@media (max-width: 768px) {
  .aei-filter-row {
    grid-template-columns: 1fr;
  }
  
  .aei-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
  }
  
  .aei-modal-content {
    width: 95%;
    margin: 20px auto;
  }
  
  .aei-modal-inner {
    padding: 20px;
  }
  
  .aei-modal-image {
    margin: -20px -20px 20px;
  }
}

