/* Map Page Full-Screen Layout Styles */

.map-page-full {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: var(--color-deep-blue-dark, #1A1F2E);
}

.map-page-full > .navbar {
  flex-shrink: 0;
}

.map-page-container {
  flex: 1;
  position: relative;
  overflow: visible;
}

/* Filter Sidebar */
.filter-sidebar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 320px;
  background: linear-gradient(180deg, var(--parchment-light) 0%, var(--parchment) 100%);
  border-right: 2px solid var(--earth-brown-light);
  box-shadow: 2px 0 20px rgba(139, 69, 19, 0.4);
  z-index: 500;
  overflow-y: auto;
  transform: translateX(0);
  transition: transform 0.4s ease;
  display: flex;
  flex-direction: column;
  animation: slideInLeft 0.5s ease-out;
}

.filter-sidebar.closed {
  transform: translateX(-100%);
  animation: slideInLeft 0.5s ease-out reverse;
}

.filter-sidebar-header {
  padding: 1.5rem;
  border-bottom: 2px solid var(--color-earth-brown-medium, #A0522D);
  flex-shrink: 0;
}

.filter-sidebar-header h2 {
  font-family: 'Cinzel', serif;
  color: var(--color-earth-brown-dark, #8B4513);
  margin: 0;
  font-size: 1.3rem;
}

.filter-sidebar-header h3 {
  font-family: 'Cinzel', serif;
  color: var(--color-earth-brown-dark, #8B4513);
  margin: 0;
  font-size: 1.3rem;
}

.filter-close-btn {
  background: transparent;
  border: none;
  color: var(--color-earth-brown-dark, #8B4513);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}

.filter-close-btn:hover {
  color: var(--color-gold-dark, #FFD700);
}

.filter-content {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

.filter-section {
  margin-bottom: 1.5rem;
}

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

.filter-section-title {
  font-family: 'Cinzel', serif;
  color: var(--color-earth-brown-dark, #8B4513);
  font-weight: bold;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.filter-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.filter-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-earth-brown-dark, #8B4513);
}

.filter-checkbox label {
  cursor: pointer;
  color: var(--color-earth-brown-dark, #8B4513);
  font-size: 0.95rem;
  margin: 0;
  user-select: none;
}

.filter-checkbox input[type="checkbox"]:hover + label {
  color: var(--color-gold-dark, #FFD700);
}

.clear-filters-btn {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background-color: var(--color-earth-brown-dark, #8B4513);
  color: var(--color-parchment-light, #F4E4BC);
  border: none;
  border-radius: 4px;
  font-family: 'Cinzel', serif;
  cursor: pointer;
  transition: background-color 0.2s;
}

.clear-filters-btn:hover {
  background-color: var(--color-earth-brown-medium, #A0522D);
}

.filter-attribution {
  padding: 1.5rem;
  margin-top: 1rem;
  border-top: 2px solid var(--color-earth-brown-medium, #A0522D);
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--color-earth-brown-dark, #8B4513);
  line-height: 1.5;
  font-family: 'Lora', serif;
  background: rgba(160, 82, 45, 0.1);
}

.filter-attribution p {
  margin: 0.5rem 0;
}

.filter-attribution em {
  display: inline;
  font-weight: 600;
}

.filter-actions {
  padding: 0 1rem;
  margin-bottom: auto;
}

/* Map Main Content */
.map-main-content {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 1;
  overflow: visible;
}

.filter-toggle-btn {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  width: 50px;
  height: 50px;
  background-color: var(--earth-brown);
  color: var(--parchment-light);
  border: 3px solid var(--gold);
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 700;
  box-shadow: 0 6px 16px rgba(139, 69, 19, 0.4),
              0 0 15px rgba(218, 165, 32, 0.2);
  animation: slideInUp 0.6s ease-out;
}

.filter-toggle-btn:hover {
  background-color: var(--earth-brown-light);
  transform: scale(1.15);
  box-shadow: 0 8px 24px rgba(139, 69, 19, 0.5),
              0 0 20px rgba(218, 165, 32, 0.4);
}

.filter-toggle-btn:active {
  transform: scale(0.95);
}

/* Map Container */
.map-container {
  flex: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.middle-earth-map-container {
  width: 100%;
  height: 100%;
}

.middle-earth-map-container .leaflet-container {
  width: 100% !important;
  height: 100% !important;
}

/* Quest Details Card */
.quest-details-card {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 380px;
  max-height: 70vh;
  background: linear-gradient(135deg, #F4E4BC 0%, #E8D5B7 100%);
  border: 3px solid #8B4513;
  border-radius: 12px;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 30px rgba(218, 165, 32, 0.2);
  display: flex;
  flex-direction: column;
  z-index: 600;
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
  overflow: hidden;
}

.map-character-panel {
  position: fixed;
  top: 6rem;
  right: 1.5rem;
  width: min(420px, 38vw);
  z-index: 650;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
}

.quest-details-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--dark-red), var(--gold), var(--forest-green), var(--dark-red));
  z-index: 0;
}

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

.quest-details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 2px solid #A0522D;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  gap: 1rem;
  background: linear-gradient(90deg, rgba(139, 69, 19, 0.1), transparent);
}

.quest-details-header h2 {
  font-family: 'Cinzel', serif;
  color: #8B4513;
  font-size: 1.3rem;
  margin: 0;
  flex: 1;
  word-wrap: break-word;
  font-weight: 700;
}

.quest-title {
  font-family: 'Cinzel', serif;
  color: var(--color-earth-brown-dark, #8B4513);
  font-size: 1.2rem;
  margin: 0;
  flex: 1;
  word-wrap: break-word;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #8B4513;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: color 0.2s;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.close-btn:hover {
  color: #FFD700;
}

.quest-details-body {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  position: relative;
  z-index: 1;
  color: #3d2817;
}

.quest-meta-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.quest-badges-map {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.quest-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: var(--quest-chip-height);
  padding: 0.35rem var(--quest-chip-padding-x);
  border-radius: var(--quest-chip-radius);
  line-height: 1;
  font-size: 0.84rem;
  font-weight: 600;
}

.quest-chip-icon {
  font-size: 0.95em;
  line-height: 1;
}

.quest-chip-label {
  line-height: 1.2;
}

.quest-type-badge {
  background: linear-gradient(135deg, var(--forest-green-light) 0%, var(--forest-green) 100%);
  color: var(--parchment-light);
  box-shadow: 0 2px 6px rgba(45, 80, 22, 0.3);
}

.quest-status {
  background: var(--status-not-yet-begun);
  color: #ffffff;
}

.quest-status-not_yet_begun,
.quest-status-pending {
  background: var(--status-not-yet-begun);
}

.quest-status-the_road_goes_ever_on,
.quest-status-in_progress {
  background: var(--status-road-goes-on);
}

.quest-status-it_is_done,
.quest-status-completed {
  background: var(--status-it-is-done);
}

.quest-status-the_shadow_falls,
.quest-status-blocked {
  background: var(--status-shadow-falls);
}

.priority-badge {
  display: inline-flex;
  align-items: center;
  min-height: var(--quest-chip-height);
  padding: 0.35rem 0.75rem;
  border-radius: var(--quest-chip-radius);
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(139, 69, 19, 0.1);
  border: 1px solid rgba(139, 69, 19, 0.4);
  color: var(--earth-brown);
}

.quest-info-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: #3d2817;
}

.quest-info-label {
  font-family: 'Cinzel', serif;
  color: var(--color-earth-brown-medium, #A0522D);
  font-size: 0.85rem;
  font-weight: bold;
}

.quest-info-value {
  color: var(--color-earth-brown-dark, #8B4513);
  font-size: 0.95rem;
}

.quest-description {
  margin: 1rem 0;
  padding: 0.75rem;
  background-color: rgba(160, 82, 45, 0.1);
  border-left: 3px solid #A0522D;
  border-radius: 4px;
  color: #3d2817;
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.5;
}

.quest-quote {
  margin: 1rem 0 0 0;
  padding: 0.75rem;
  background-color: rgba(218, 165, 32, 0.1);
  border-left: 3px solid #FFD700;
  border-radius: 4px;
  color: #3d2817;
  font-size: 0.85rem;
  font-style: italic;
  line-height: 1.5;
}

.quest-details-actions {
  padding: 1.5rem;
  border-top: 2px solid #A0522D;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--quest-action-gap);
  position: relative;
  z-index: 1;
  background: linear-gradient(90deg, transparent, rgba(139, 69, 19, 0.05));
}

.map-action-btn {
  width: 100%;
  min-height: var(--quest-action-min-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  .filter-sidebar {
    width: 280px;
  }
  
  .quest-details-card {
    width: 300px;
    bottom: 1rem;
    right: 1rem;
  }
  
  .filter-toggle-btn {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .filter-sidebar {
    width: 100%;
  }
  
  .quest-details-card {
    width: calc(100% - 2rem);
    max-height: 50vh;
    max-width: none;
  }

  .quest-details-actions {
    grid-template-columns: 1fr;
  }
  
  .filter-toggle-btn {
    bottom: 1rem;
    left: 1rem;
  }
}

/* Map Attribution - Moved to filter sidebar */
.map-attribution {
  display: none;
}
