/* Atelier WebOS - Extracted Gallery Features Stylesheet (PiP, Favorites, Archives, Search, Permissions, Map) */

/* -------------------------------------------------------------
 * 1. FLOATING PICTURE-IN-PICTURE (PiP) PLAYER WIDGET
 * ------------------------------------------------------------- */
#pip-player-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 320px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  border-radius: 16px;
  overflow: hidden;
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

#pip-player-widget.minimized {
  height: 52px;
  width: 240px;
}

#pip-player-widget.minimized .pip-media-content {
  display: none;
}

#pip-player-widget.expanded {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  right: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
  z-index: 10000 !important;
  background: rgba(0, 0, 0, 0.96) !important;
}

#pip-player-widget.expanded .pip-header {
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  cursor: default;
}

#pip-player-widget.expanded .pip-title {
  font-size: 1rem;
  max-width: calc(100vw - 200px);
}

#pip-player-widget.expanded .pip-media-content {
  flex: 1;
  width: 100%;
  height: calc(100vh - 56px);
  max-height: calc(100vh - 56px);
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#pip-player-widget.expanded .pip-media-content video {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 56px);
  object-fit: contain;
}

#pip-player-widget.expanded .pip-media-content audio {
  width: min(600px, 90vw);
}

#pip-player-widget.expanded .pip-info-panel {
  position: absolute;
  top: 60px;
  right: 20px;
  width: 360px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 100px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8);
  z-index: 10001;
}

.pip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: move;
}

.pip-title {
  font-size: 0.825rem;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.pip-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pip-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #94a3b8;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.2s ease;
}

.pip-btn:hover {
  background: #6366f1;
  color: white;
}

.pip-media-content {
  width: 100%;
  max-height: 200px;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pip-media-content video, .pip-media-content audio {
  width: 100%;
  max-height: 200px;
  outline: none;
}

.pip-info-panel {
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  max-height: 200px;
  overflow-y: auto;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: fadeIn 0.2s ease;
}

.pip-info-panel .meta-section-card {
  padding: 0.55rem 0.75rem;
  gap: 0.4rem;
}

.pip-info-panel .meta-row {
  font-size: 0.75rem;
}

/* -------------------------------------------------------------
 * 2. FAVORITES HEART BADGES & TOGGLE
 * ------------------------------------------------------------- */
.favorite-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.favorite-btn:hover, .favorite-btn.is-favorite {
  background: rgba(239, 68, 68, 0.9);
  color: #ffffff;
  border-color: #ef4444;
}

.pip-card-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.pip-card-btn:hover {
  background: #6366f1;
  color: #ffffff;
  transform: scale(1.1);
}
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.favorite-btn.is-favorite {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.15);
  transform: scale(1.1);
}

.favorite-btn:hover {
  transform: scale(1.2);
  color: #ef4444;
}

/* -------------------------------------------------------------
 * 3. MULTI-FORMAT ARCHIVE DROPDOWN MENU
 * ------------------------------------------------------------- */
.archive-dropdown-container {
  position: relative;
  display: inline-block;
}

.archive-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  padding: 6px;
  min-width: 160px;
  z-index: 100;
  display: none;
}

.archive-dropdown-container:hover .archive-dropdown-menu,
.archive-dropdown-menu.show {
  display: block;
}

.archive-option-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: #f8fafc;
  font-size: 0.825rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.archive-option-item:hover {
  background: rgba(99, 102, 241, 0.25);
  color: #818cf8;
}

/* -------------------------------------------------------------
 * 4. GOOGLE DRIVE STYLE ADVANCED SEARCH MODAL / POPOVER
 * ------------------------------------------------------------- */
.search-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 99998;
  display: block;
}

.search-modal-backdrop.open {
  display: block;
}

.search-modal-card {
  position: fixed;
  width: 580px;
  max-width: calc(100vw - 24px);
  background: var(--window-bg, var(--bg-card, #182030));
  color: var(--text-main, #f8fafc);
  border: 1px solid var(--border-color, rgba(128, 128, 128, 0.25));
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--border-color, rgba(255, 255, 255, 0.08));
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 70px);
  overflow-y: auto;
  z-index: 99999;
  box-sizing: border-box;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.gdrive-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color, rgba(128, 128, 128, 0.15));
}

.gdrive-modal-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main, #f8fafc);
  display: flex;
  align-items: center;
  gap: 8px;
}

.gdrive-modal-close {
  background: var(--bg-card, rgba(128, 128, 128, 0.12));
  border: 1px solid var(--border-color, transparent);
  color: var(--text-muted, #94a3b8);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gdrive-modal-close:hover {
  background: var(--border-color-hover, rgba(99, 102, 241, 0.25));
  color: var(--text-main, #ffffff);
}

.gdrive-search-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gdrive-form-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 16px;
}

@media (max-width: 580px) {
  .gdrive-form-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.gdrive-form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main, #f8fafc);
  opacity: 0.85;
}

.gdrive-form-control {
  width: 100%;
}

.gdrive-input, .gdrive-select {
  width: 100%;
  background: var(--bg-card, rgba(128, 128, 128, 0.08));
  border: 1px solid var(--border-color, rgba(128, 128, 128, 0.22));
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 0.875rem;
  color: var(--text-main, #f8fafc);
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.gdrive-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.gdrive-select option {
  background: var(--window-bg, var(--bg-main, #182030));
  color: var(--text-main, #f8fafc);
}

.gdrive-input:focus, .gdrive-select:focus {
  border-color: var(--accent-primary, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.gdrive-input::placeholder {
  color: var(--text-muted, #94a3b8);
  opacity: 0.7;
}

.gdrive-date-range {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gdrive-date-label {
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 500;
}

.gdrive-date-input {
  flex: 1;
}

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

.gdrive-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-main, #f8fafc);
  cursor: pointer;
}

.gdrive-checkbox {
  width: 17px;
  height: 17px;
  accent-color: var(--accent-primary, #6366f1);
  cursor: pointer;
}

.gdrive-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 14px;
  margin-top: 6px;
  border-top: 1px solid var(--border-color, rgba(128, 128, 128, 0.15));
}

.gdrive-btn-text {
  background: transparent;
  border: 1px solid var(--border-color, rgba(128, 128, 128, 0.2));
  color: var(--text-muted, #94a3b8);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gdrive-btn-text:hover {
  background: var(--bg-card, rgba(128, 128, 128, 0.1));
  color: var(--text-main, #f8fafc);
}

.gdrive-btn-primary {
  background: var(--accent-primary, #2563eb);
  background-image: linear-gradient(135deg, var(--accent-primary, #3b82f6) 0%, #1d4ed8 100%);
  border: none;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 9px 24px;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.gdrive-btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.5);
  transform: translateY(-1px);
}

/* -------------------------------------------------------------
 * 5. ADMIN PERMISSIONS MATRIX UI
 * ------------------------------------------------------------- */
.permissions-matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.perm-checkbox-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.perm-checkbox-card:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
}

.perm-checkbox-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #6366f1;
  cursor: pointer;
}

/* -------------------------------------------------------------
 * 6. LEAFLET INTERACTIVE MAP & GPS TRAIL
 * ------------------------------------------------------------- */
.folder-map-btn {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #818cf8;
  font-size: 0.825rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.folder-map-btn:hover {
  background: #6366f1;
  color: #ffffff;
  border-color: #6366f1;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.gps-badge {
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #818cf8;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s ease;
}

.gps-badge:hover {
  background: #6366f1;
  color: #ffffff;
  border-color: #6366f1;
  transform: scale(1.05);
}

/* Fullscreen / Backdrop Map Modal */
.map-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.map-modal-backdrop.open {
  opacity: 1;
}

.map-modal-card {
  width: 100%;
  max-width: 1200px;
  height: 88vh;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8), 0 0 1px 1px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.map-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #182030;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
  gap: 12px;
}

.map-modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.map-modal-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #f8fafc;
}

.map-count-badge {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}

.map-modal-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.map-layer-selector {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 2px;
}

.map-layer-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.775rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.map-layer-btn:hover {
  color: #ffffff;
}

.map-layer-btn.active {
  background: #6366f1;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.map-ctrl-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.map-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.map-ctrl-btn.active {
  background: rgba(99, 102, 241, 0.25);
  border-color: #6366f1;
  color: #a5b4fc;
}

.map-modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.map-modal-close:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
}

.map-canvas {
  width: 100%;
  height: 100%;
  flex: 1;
  background: #0f172a;
  z-index: 1;
}

/* Custom Marker Pins with Photo Thumbnails */
.custom-map-marker {
  background: transparent;
  border: none;
}

.marker-bubble {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(99, 102, 241, 0.6);
  overflow: hidden;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.marker-bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.marker-pointer {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #ffffff;
  margin: -2px auto 0 auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.marker-bubble.magic {
  border: 2.5px dashed #c084fc;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 12px rgba(192, 132, 252, 0.75);
}

.marker-magic-sparkle {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #9333ea;
  background-image: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%);
  color: #ffffff;
  font-size: 9px;
  font-weight: bold;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.marker-pointer.magic-pointer {
  border-top-color: #c084fc;
}

.custom-map-marker:hover .marker-bubble,
.marker-bubble.highlight {
  transform: scale(1.25) translateY(-4px);
  border-color: #6366f1;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.8), 0 0 0 3px #ffffff;
  z-index: 9999 !important;
}

.custom-map-marker:hover .marker-bubble.magic,
.marker-bubble.magic.highlight {
  border-color: #d8b4fe;
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.9), 0 0 0 3px #ffffff;
}

.map-popup-magic-badge {
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #d8b4fe;
  font-size: 0.725rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 8px;
  margin-bottom: 2px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.gps-badge.magic-badge {
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
}

.gps-badge.magic-badge:hover {
  background: #9333ea;
  color: #ffffff;
  border-color: #9333ea;
}

/* Custom Leaflet Popups */
.atelier-leaflet-popup .leaflet-popup-content-wrapper {
  background: #182030;
  background-image: linear-gradient(180deg, #1e293b 0%, #111827 100%);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  padding: 0;
  overflow: hidden;
}

.atelier-leaflet-popup .leaflet-popup-content {
  margin: 0;
  line-height: 1.4;
}

.atelier-leaflet-popup .leaflet-popup-tip {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.atelier-leaflet-popup a.leaflet-popup-close-button {
  color: #94a3b8;
  padding: 6px;
}

.atelier-leaflet-popup a.leaflet-popup-close-button:hover {
  color: #ffffff;
}

.map-popup-card {
  width: 240px;
  display: flex;
  flex-direction: column;
}

.map-popup-img-wrap {
  width: 100%;
  height: 140px;
  position: relative;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}

.map-popup-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.map-popup-img-wrap:hover img {
  transform: scale(1.05);
}

.map-popup-play-overlay {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.map-popup-info {
  padding: 12px 14px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-popup-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-popup-date {
  font-size: 0.775rem;
  color: #94a3b8;
}

.map-popup-comment {
  font-size: 0.8rem;
  color: #cbd5e1;
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.map-popup-btn {
  margin-top: 6px;
  background: #6366f1;
  border: none;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.map-popup-btn:hover {
  background: #4f46e5;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Lightbox EXIF Mini Map */
.exif-mini-map {
  width: 100%;
  height: 140px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin: 8px 0;
  overflow: hidden;
  background: #0f172a;
}

/* Protection anti-téléchargement direct (Désactivation glisser-déposer & clic droit) */
body.no-direct-download img,
body.no-direct-download video,
body.no-direct-download audio {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Multi-Selection & Rectangular Marquee Selection Styles */
.polaroid-card.selected,
.grid-card.selected,
.mosaic-card.selected {
  outline: 3px solid #6366f1 !important;
  box-shadow: 0 0 18px rgba(99, 102, 241, 0.5) !important;
  transform: translateY(-2px);
  position: relative;
}

.polaroid-card.selected::before,
.grid-card.selected::before,
.mosaic-card.selected::before {
  content: '✓';
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  background: #6366f1;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.8rem;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.list-table-row.selected {
  background: rgba(99, 102, 241, 0.22) !important;
  border-color: rgba(99, 102, 241, 0.6) !important;
  box-shadow: inset 4px 0 0 #6366f1, 0 0 12px rgba(99, 102, 241, 0.2) !important;
}

.list-table-row.selected .list-col-preview {
  position: relative;
}

.list-table-row.selected .list-col-preview::after {
  content: '✓';
  position: absolute;
  top: -4px;
  left: -4px;
  width: 18px;
  height: 18px;
  background: #6366f1;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.65rem;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Rectangular Marquee Lasso Selection Box */
.selection-marquee {
  position: fixed;
  border: 1.5px dashed #6366f1;
  background: rgba(99, 102, 241, 0.18);
  pointer-events: none;
  z-index: 9999;
  border-radius: 4px;
}

/* Floating Multi-Selection Action Toolbar */
.selection-toolbar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(99, 102, 241, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.5rem 1.25rem;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.75rem;
  z-index: 1500;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  max-width: 92vw;
}

.selection-toolbar-count {
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 600;
}

.selection-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #ffffff;
  padding: 5px 12px;
  border-radius: 15px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.selection-btn:hover {
  background: #6366f1;
}

/* Custom Drag Follower (50% True CSS Transparency on Drag Preview) */
.custom-drag-follower {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none !important;
  z-index: 10000;
  opacity: 0.5;
  transform: translate(-50%, -50%);
  border: 2px solid #6366f1;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  padding: 4px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: none;
}

.drag-follower-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #6366f1;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

