.rk-widget-container * {
  box-sizing: border-box;
}

.rk-widget-container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  padding: 30px;
  border-radius: 8px;
  color: #333;
  line-height: 1.6;
  font-family: Arial, sans-serif;
}

.rk-widget-container h1 {
  margin-bottom: 30px;
  color: #2c3e50;
  font-size: 2.5rem;
}

.filters-section {
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 6px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.filter-group {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.filter-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #495057;
}

/* Custom dropdown */
.custom-dropdown {
  position: relative;
}

.dropdown-trigger {
  width: 100%;
  padding: 12px 40px 12px 15px;
  font-size: 16px;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dropdown-trigger::after {
  content: "\f078";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #6c757d;
  transition: transform 0.2s;
}

.dropdown-trigger:hover,
.dropdown-trigger:focus {
  background: #fbfbfb;
}

.custom-dropdown.open .dropdown-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: white;
  border: 2px solid #007bff;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.custom-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  padding: 12px 15px;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: #e9ecef;
  outline: none;
}

.dropdown-item.active {
  background: #007bff;
  color: white;
  font-weight: 600;
}

.dropdown-item.hidden {
  display: none;
}

.dropdown-item-text {
  flex: 1;
}

.dropdown-item-count {
  background: rgba(0, 0, 0, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  margin-left: 10px;
}

.dropdown-item.active .dropdown-item-count {
  background: rgba(255, 255, 255, 0.3);
}

/* Scrollbar styling */
.dropdown-menu::-webkit-scrollbar {
  width: 8px;
}

.dropdown-menu::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

/* Calendar Section */
.calendar-section {
  margin-bottom: 30px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
}

.calendar-nav-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 5px 15px;
  border-radius: 4px;
  transition: background 0.2s;
}

.calendar-nav-btn:hover {
  background: #e9ecef;
}

.calendar-nav-btn:focus {
  background: #e9ecef;
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.calendar-title {
  font-size: 20px;
  font-weight: bold;
  margin: 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-top: 20px;
}

.calendar-day-name {
  text-align: center;
  font-weight: bold;
  padding: 10px;
  color: #333;
  font-size: 14px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  background: white;
  padding: 8px;
  min-height: 60px;
  color: #333;
}

.calendar-day:hover {
  border-color: #007bff;
  background: white;
}

.calendar-day:focus {
  background: white;
  border-color: #007bff;
  outline: 3px solid #007bff;
  outline-offset: -3px;
}

.calendar-day.selected {
  background: #007bff;
  border-color: #007bff;
  color: white;
}

.calendar-day.disabled {
  border: 2px solid #dee2e6;
  background: white;
  cursor: not-allowed;
}

.calendar-day.empty {
  border: none;
  background: transparent;
  visibility: hidden;
  opacity: 0;
  cursor: default;
}

.calendar-day .day-number {
  font-size: 20px;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.event-indicator {
  width: 6px;
  height: 6px;
  background: #007bff;
  border-radius: 50%;
}

.calendar-day.selected .event-indicator {
  background: white;
}

/* Events List */
.events-section {
  margin-top: 30px;
}

.events-section h2 {
  margin-bottom: 20px;
  color: #2c3e50;
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.event-card {
  padding: 0;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 4px solid #007bff;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  color: inherit;
}

.event-card-image {
  width: 200px;
  min-width: 200px;
  background-size: cover;
  background-position: center;
  background-color: #eee;
}

.event-card-content {
  padding: 20px;
  flex: 1;
}

.event-card:hover,
.event-card:focus-within {
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.event-date {
  color: #6c757d;
  font-size: 14px;
  margin-bottom: 8px;
}

.event-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #2c3e50;
}

.event-meta {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #6c757d;
}

.event-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.no-events {
  text-align: center;
  padding: 40px;
  color: #6c757d;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.event-meta span {
  background: white;
  padding: 6px 12px;
  border-radius: 3px;
}

.event-date {
  background: white;
  display: inline-block;
  padding: 3px 12px;
  border-radius: 6px;
  font-weight: 600;
}

.event-title {
  font-size: 24px;
}

/* Responsive */
@media (max-width: 768px) {
  .rk-widget-container {
    padding: 15px;
  }

  .filters-section {
    flex-direction: column;
    gap: 15px;
  }

  .filter-group {
    min-width: 100%;
  }

  .calendar-grid {
    gap: 5px;
  }

  .calendar-day {
    font-size: 14px;
    padding: 4px;
    min-height: 50px;
  }

  .calendar-title {
    font-size: 16px;
  }

  .event-card {
    flex-direction: column;
  }

  .event-card-image {
    width: 100%;
    height: 300px;
  }

  .event-meta span {
    background: white;
    padding: 6px 12px;
    border-radius: 3px;
  }

  .event-date {
    background: white;
    display: inline-block;
    padding: 3px 12px;
    border-radius: 6px;
    font-weight: 600;
  }

  .event-title {
    font-size: 24px;
  }
}
