/* LAN Map - Custom Styles */
@import url("components.css");

/* General Styles */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #fafafa;
}

main {
  flex: 1;
}

/* Navbar Styles */
.navbar-brand {
  font-size: 1.5rem;
  letter-spacing: -0.5px;
}

.navbar {
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%) !important;
}

/* Welcome Hero */
.welcome-hero {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
}

.welcome-hero h1 {
  color: #212529;
}

.welcome-hero p {
  font-size: 1.05rem;
}

/* Form Input Enhancements */
.form-control:focus,
.form-select:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.form-control,
.form-select {
  border-radius: 8px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

/* Button Enhancements */
.btn {
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-primary {
  box-shadow: 0 2px 4px rgba(13, 110, 253, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 4px 8px rgba(13, 110, 253, 0.35);
  transform: translateY(-1px);
}

/* Card Styles */
.card {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.event-card {
  cursor: pointer;
  border: 3px solid transparent;
}

/* Selected Event Card */
.event-card.selected {
  border-color: #0d6efd;
  box-shadow: 0 0 20px rgba(13, 110, 253, 0.4);
  transform: scale(1.02);
}

/* Event Card Specific Styles */
.event-card .card-title {
  color: #0d6efd;
  font-weight: 600;
}

.event-meta {
  font-size: 0.9rem;
  color: #6c757d;
}

.event-meta i {
  width: 20px;
  text-align: center;
  margin-right: 5px;
}

/* Badge Styles */
.badge-upcoming {
  background-color: #198754;
}

.badge-ongoing {
  background-color: #0d6efd;
}

.badge-past {
  background-color: #6c757d;
}

.badge {
  border-radius: 50px;
  padding: 0.35em 0.65em;
  font-weight: 500;
  font-size: 0.7rem;
}

/* Compact Filter Bar */
.filter-bar-compact {
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.filter-label {
  display: flex;
  align-items: center;
  font-weight: 500;
  color: #495057;
}

.input-icon-wrapper {
  position: relative;
}

.input-icon-wrapper .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  pointer-events: none;
}

.input-icon-wrapper .form-control {
  padding-left: 40px;
}

.btn-pill {
  border-radius: 50px;
  padding: 6px 16px;
  font-weight: 500;
  font-size: 0.875rem;
}

/* Event Card Enhancements */
.event-card {
  border-radius: 12px;
  overflow: hidden;
  border: none;
}

.event-card .status-strip {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.event-card .date-badge {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 8px 12px;
  text-align: center;
  min-width: 50px;
}

.event-card .date-badge .day {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  color: #212529;
}

.event-card .date-badge .month {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #6c757d;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Improved Empty State */
.empty-state-modern {
  padding: 4rem 2rem;
}

.empty-state-modern .empty-icon {
  width: 80px;
  height: 80px;
  background: #f8f9fa;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.empty-state-modern .empty-icon svg {
  width: 40px;
  height: 40px;
  color: #adb5bd;
}

.empty-state-modern h4 {
  color: #495057;
  font-weight: 600;
}

.empty-state-modern p {
  color: #6c757d;
}

/* Loading skeleton animation */
@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 0px, #e0e0e0 40px, #f0f0f0 80px);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 4px;
}

/* Loading State */
#loading-indicator {
  padding: 3rem 0;
}

.loading-spinner-modern {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.loading-spinner-modern .spinner-border {
  width: 48px;
  height: 48px;
  border-width: 3px;
}

.loading-spinner-modern p {
  color: #6c757d;
  font-size: 0.95rem;
}

/* Empty State */
#empty-state {
  padding: 3rem 0;
}

#empty-state svg {
  opacity: 0.5;
}

/* Modal Styles */
.modal-body h6 {
  color: #0d6efd;
  font-weight: 600;
  margin-top: 1rem;
}

.modal-body h6:first-child {
  margin-top: 0;
}

/* Desktop Layout - Side by Side */
#desktop-layout {
  min-height: 80vh;
}

#map-desktop {
  height: 80vh;
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid #dee2e6;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1;
}

#events-desktop {
  max-height: 80vh;
  overflow-y: auto;
  padding-right: 10px;
}

#events-desktop .event-card {
  margin-bottom: 1rem;
}

/* Mobile Layout */
#mobile-layout {
  width: 100%;
}

#map-mobile {
  height: 60vh;
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid #dee2e6;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1;
}

/* Map Marker Styles */
.marker-selected .leaflet-marker-icon {
  filter: drop-shadow(0 0 15px rgba(13, 110, 253, 0.9));
}

/* Circle marker selection styles */
.leaflet-interactive.marker-selected {
  stroke: #fff !important;
  stroke-width: 3px !important;
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.5));
}

/* Leaflet Popup Styles */
.leaflet-popup-content {
  margin: 12px;
}

.leaflet-popup-content h6 {
  color: #0d6efd;
  font-weight: 600;
  margin-bottom: 8px;
}

/* View Toggle Button Styles */
.btn-group .btn.active {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: white;
}

.btn-group .btn-outline-primary:hover {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: white;
}

.btn-group {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 12px !important;
  overflow: hidden;
}

.btn-group .btn {
  border-radius: 0;
}

/* Footer Styles */
footer {
  border-top: 1px solid #dee2e6;
}

/* Utility Classes */
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Auth Form Styles */
#login-form .form-label,
#register-form .form-label {
  font-weight: 500;
}

#login-error,
#register-error {
  margin-bottom: 1rem;
}

#user-dropdown .dropdown-toggle::after {
  margin-left: 0.5rem;
}

/* Toast Notification Styles */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1060;
}

.toast {
  min-width: 250px;
  padding: 12px 20px;
  margin-bottom: 10px;
  border-radius: 0.375rem;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
  animation: slideIn 0.3s ease-out;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast-success {
  background-color: #d1e7dd;
  border: 1px solid #badbcc;
  color: #0f5132;
}

.toast-error {
  background-color: #f8d7da;
  border: 1px solid #f5c2c7;
  color: #842029;
}

.toast-info {
  background-color: #cff4fc;
  border: 1px solid #b6effb;
  color: #055160;
}

.toast-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  margin-left: 10px;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.toast-close:hover {
  opacity: 1;
}

.btn-primary:hover {
  box-shadow: 0 4px 8px rgba(13, 110, 253, 0.35);
  transform: translateY(-1px);
}

/* Responsive Adjustments */
@media (max-width: 991px) {
  .navbar-brand {
    font-size: 1.25rem;
  }

  .card {
    margin-bottom: 1rem;
  }
}

@media (max-width: 768px) {
  .filter-bar-compact {
    padding: 12px 16px;
  }

  .filter-bar-compact .row {
    gap: 8px;
  }

  .welcome-hero {
    padding: 2rem 1rem;
  }

  .welcome-hero h1 {
    font-size: 1.5rem;
  }
}

/* Search Highlight */
.search-highlight {
  background-color: #fff3cd;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 500;
  color: #856404;
}
