/**
 * ExploreX Events and Workshops Styles
 * Space Travel Experience Recommendation System
 * 
 * Comprehensive styling for event and workshop components including:
 * - Event card layouts and interactions
 * - Event filtering and search interfaces
 * - Registration forms and modals
 * - Calendar and date picker components
 * - Responsive design for all devices
 */

/* =============================================================================
   EVENT CARD STYLES
   ============================================================================= */

.event-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-color: #64b5f6;
}

.event-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 20px 0 20px;
}

.event-type-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.event-type-icon {
  font-size: 14px;
}

.event-type-label {
  font-size: 11px;
}

.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 8px 12px;
  min-width: 60px;
}

.event-date-day {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1;
}

.event-date-month {
  font-size: 12px;
  font-weight: 600;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.event-card-content {
  padding: 16px 20px;
}

.event-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.event-description {
  font-size: 14px;
  color: #666666;
  line-height: 1.5;
  margin: 0 0 16px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-details {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.event-detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.event-detail-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.event-detail-text {
  color: #333333;
  flex: 1;
}

.event-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.event-tag {
  padding: 4px 8px;
  background: #e3f2fd;
  color: #1976d2;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: lowercase;
}

.event-card-actions {
  display: flex;
  gap: 8px;
  padding: 0 20px 20px 20px;
}

.event-action-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  justify-content: center;
}

.event-action-button.primary {
  background: linear-gradient(135deg, #64b5f6, #42a5f5);
  color: #ffffff;
}

.event-action-button.primary:hover {
  background: linear-gradient(135deg, #42a5f5, #1e88e5);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(66, 165, 245, 0.3);
}

.event-action-button.secondary {
  background: #ffffff;
  color: #64b5f6;
  border: 2px solid #64b5f6;
}

.event-action-button.secondary:hover {
  background: #64b5f6;
  color: #ffffff;
  transform: translateY(-1px);
}

/* =============================================================================
   EVENT GRID AND LAYOUT
   ============================================================================= */

.events-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.events-header {
  text-align: center;
  margin-bottom: 40px;
}

.events-title {
  font-size: 32px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 12px 0;
}

.events-subtitle {
  font-size: 16px;
  color: #666666;
  margin: 0;
  line-height: 1.5;
}

.events-filters {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.events-filters-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 20px 0;
}

.events-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-label {
  font-size: 14px;
  font-weight: 600;
  color: #333333;
  margin-bottom: 4px;
}

.filter-input,
.filter-select {
  padding: 10px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: #64b5f6;
  box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.1);
}

.filter-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.filter-checkbox:hover {
  background: #f8f9fa;
}

.filter-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #64b5f6;
}

.filter-checkbox-label {
  font-size: 14px;
  color: #333333;
  cursor: pointer;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.events-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 16px 0;
  border-bottom: 1px solid #e0e0e0;
}

.events-results-count {
  font-size: 16px;
  color: #333333;
}

.events-results-count strong {
  color: #1a1a2e;
  font-weight: 600;
}

.events-sort-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sort-label {
  font-size: 14px;
  color: #666666;
  font-weight: 600;
}

.sort-select {
  padding: 6px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 14px;
  background: #ffffff;
  cursor: pointer;
}

/* =============================================================================
   EVENT DETAIL MODAL STYLES
   ============================================================================= */

.event-detail-modal {
  max-width: 800px;
  margin: 0 auto;
}

.event-modal-header {
  position: relative;
  height: 250px;
  background-size: cover;
  background-position: center;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.event-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.1) 50%,
    rgba(0, 0, 0, 0.7) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
}

.event-modal-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.event-modal-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.event-modal-badge.free {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
}

.event-modal-badge.workshop {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
}

.event-modal-badge.celestial {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
}

.event-modal-info {
  color: #ffffff;
}

.event-modal-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px 0;
  line-height: 1.2;
}

.event-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
}

.event-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.event-modal-content {
  padding: 30px;
}

.event-content-section {
  margin-bottom: 30px;
}

.event-content-section:last-child {
  margin-bottom: 0;
}

.event-section-title {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 16px 0;
  border-bottom: 2px solid #64b5f6;
  padding-bottom: 8px;
}

.event-description-full {
  font-size: 16px;
  line-height: 1.6;
  color: #333333;
  margin: 0 0 20px 0;
}

.event-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.event-detail-card {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
}

.event-detail-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 12px 0;
}

.event-detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.event-detail-list li {
  padding: 6px 0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 14px;
  color: #333333;
}

.event-detail-list li:last-child {
  border-bottom: none;
}

.event-requirements {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
}

.event-requirements-title {
  font-size: 14px;
  font-weight: 600;
  color: #856404;
  margin: 0 0 8px 0;
}

.event-requirements-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.event-requirements-list li {
  font-size: 14px;
  color: #856404;
  padding: 2px 0;
}

.event-requirements-list li::before {
  content: '• ';
  color: #f59e0b;
  font-weight: bold;
}

/* =============================================================================
   EVENT REGISTRATION FORM
   ============================================================================= */

.event-registration-form {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 24px;
  margin-top: 20px;
}

.registration-form-title {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 20px 0;
  text-align: center;
}

.registration-form-grid {
  display: grid;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: #333333;
}

.form-input {
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: #64b5f6;
  box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.1);
}

.form-input.error {
  border-color: #ef4444;
}

.form-error {
  font-size: 12px;
  color: #ef4444;
  margin-top: 4px;
}

.form-checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 0;
}

.form-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #64b5f6;
  margin-top: 2px;
}

.form-checkbox-label {
  font-size: 14px;
  color: #333333;
  line-height: 1.4;
  cursor: pointer;
}

.registration-summary {
  background: #e8f5e8;
  border: 1px solid #4caf50;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
}

.registration-summary-title {
  font-size: 16px;
  font-weight: 600;
  color: #2e7d32;
  margin: 0 0 8px 0;
}

.registration-summary-details {
  font-size: 14px;
  color: #388e3c;
  line-height: 1.4;
}

.registration-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.registration-button {
  flex: 1;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.registration-button.primary {
  background: linear-gradient(135deg, #64b5f6, #42a5f5);
  color: #ffffff;
}

.registration-button.primary:hover {
  background: linear-gradient(135deg, #42a5f5, #1e88e5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(66, 165, 245, 0.3);
}

.registration-button.secondary {
  background: #ffffff;
  color: #64b5f6;
  border: 2px solid #64b5f6;
}

.registration-button.secondary:hover {
  background: #64b5f6;
  color: #ffffff;
  transform: translateY(-2px);
}

/* =============================================================================
   EVENT CALENDAR STYLES
   ============================================================================= */

.event-calendar {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.calendar-header {
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  color: #ffffff;
  padding: 20px;
  text-align: center;
}

.calendar-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.calendar-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}

.calendar-nav-button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.calendar-nav-button:hover {
  background: rgba(255, 255, 255, 0.3);
}

.calendar-month-year {
  font-size: 18px;
  font-weight: 600;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-day-header {
  background: #f8f9fa;
  padding: 12px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e0e0e0;
}

.calendar-day {
  min-height: 80px;
  padding: 8px;
  border-bottom: 1px solid #f0f0f0;
  border-right: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background-color 0.3s ease;
  position: relative;
}

.calendar-day:hover {
  background: #f8f9fa;
}

.calendar-day.other-month {
  color: #cccccc;
  background: #fafafa;
}

.calendar-day.today {
  background: #e3f2fd;
  border: 2px solid #64b5f6;
}

.calendar-day.has-events {
  background: #fff3e0;
}

.calendar-day-number {
  font-size: 14px;
  font-weight: 600;
  color: #333333;
  margin-bottom: 4px;
}

.calendar-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calendar-event {
  background: #64b5f6;
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
}

.calendar-event.workshop {
  background: #3b82f6;
}

.calendar-event.celestial {
  background: #f59e0b;
}

.calendar-event.lecture {
  background: #06b6d4;
}

.calendar-event.stargazing {
  background: #8b5cf6;
}

/* =============================================================================
   LOADING AND EMPTY STATES
   ============================================================================= */

.events-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.events-loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e0e0e0;
  border-top: 4px solid #64b5f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

.events-loading-text {
  font-size: 16px;
  color: #666666;
}

.events-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.events-empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.events-empty-title {
  font-size: 20px;
  font-weight: 600;
  color: #333333;
  margin: 0 0 8px 0;
}

.events-empty-text {
  font-size: 16px;
  color: #666666;
  line-height: 1.5;
  max-width: 400px;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 768px) {
  .events-container {
    padding: 15px;
  }

  .events-title {
    font-size: 24px;
  }

  .events-filters-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .events-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .events-results-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .event-card-header {
    padding: 12px 16px 0 16px;
  }

  .event-card-content {
    padding: 12px 16px;
  }

  .event-card-actions {
    padding: 0 16px 16px 16px;
    flex-direction: column;
  }

  .event-modal-content {
    padding: 20px;
  }

  .event-details-grid {
    grid-template-columns: 1fr;
  }

  .registration-actions {
    flex-direction: column;
  }

  .calendar-day {
    min-height: 60px;
    padding: 4px;
  }

  .calendar-day-number {
    font-size: 12px;
  }

  .calendar-event {
    font-size: 9px;
    padding: 1px 4px;
  }
}

@media (max-width: 480px) {
  .events-filters {
    padding: 16px;
  }

  .event-type-badge {
    padding: 4px 8px;
  }

  .event-type-label {
    display: none;
  }

  .event-title {
    font-size: 16px;
  }

  .event-description {
    -webkit-line-clamp: 1;
  }

  .event-modal-title {
    font-size: 20px;
  }

  .event-modal-content {
    padding: 15px;
  }

  .calendar-header {
    padding: 15px;
  }

  .calendar-title {
    font-size: 16px;
  }

  .calendar-month-year {
    font-size: 14px;
  }
}

/* =============================================================================
   ANIMATIONS
   ============================================================================= */

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.event-card {
  animation: fadeIn 0.3s ease;
}

.event-card:nth-child(even) {
  animation-delay: 0.1s;
}

.event-card:nth-child(3n) {
  animation-delay: 0.2s;
}

/* =============================================================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================================================= */

.event-card:focus,
.event-action-button:focus,
.filter-input:focus,
.filter-select:focus,
.form-input:focus,
.registration-button:focus {
  outline: 3px solid #64b5f6;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =============================================================================
   PRINT STYLES
   ============================================================================= */

@media print {
  .event-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #000;
  }

  .event-card-actions,
  .events-filters,
  .calendar-navigation {
    display: none !important;
  }

  .events-grid {
    grid-template-columns: 1fr;
  }
}