/* AtlasViewManager — Shared saved-views + column prefs component */

/* ========== Saved Views Section ========== */
.vm-saved-views-section {
  margin-bottom: 8px;
}

.vm-saved-views-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.vm-saved-views-header h3 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7280;
  margin: 0;
}

.vm-save-view-btn {
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  color: #6b7280;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.vm-save-view-btn:hover {
  border-color: #C41230;
  color: #C41230;
}

.vm-views-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 140px;
  overflow-y: auto;
}

/* When empty: collapse to just the "+" save button inline */
.vm-empty .vm-saved-views-header h3 {
  display: none;
}
.vm-empty .vm-saved-views-header {
  margin-bottom: 0;
}
.vm-empty .vm-views-list {
  display: none;
}

.vm-view-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.vm-view-item:hover {
  border-color: #C41230;
  background: #fef2f2;
}

.vm-view-item.active {
  border-color: #C41230;
  background: #fef2f2;
}

.vm-view-name {
  font-size: 12px;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.vm-view-shared-icon {
  color: #6b7280;
  flex-shrink: 0;
}

.vm-view-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.vm-view-actions button {
  opacity: 0;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 2px;
  font-size: 14px;
  line-height: 1;
  transition: opacity 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vm-view-item:hover .vm-view-actions button {
  opacity: 1;
}

.vm-view-actions .vm-copy-url:hover {
  color: #C41230;
}

.vm-view-actions .vm-edit-view:hover {
  color: #2563eb;
}

.vm-view-actions .vm-delete-view:hover {
  color: #dc2626;
}

.vm-view-actions .vm-extra-action:hover {
  color: #C41230;
}

/* ========== Modals ========== */
.vm-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vm-modal.hidden {
  display: none;
}

.vm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.vm-modal-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: 400px;
  max-width: 90vw;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.vm-modal-content h3 {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 16px 0;
}

.vm-modal-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  color: #111827;
  box-sizing: border-box;
  outline: none;
}

.vm-modal-input:focus {
  border-color: #C41230;
  box-shadow: 0 0 0 3px rgba(196, 18, 48, 0.1);
}

.vm-form-group {
  margin-top: 12px;
}

.vm-form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 4px;
}

.vm-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
}

.vm-checkbox-label input[type="checkbox"] {
  accent-color: #C41230;
}

.vm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.vm-btn-secondary {
  padding: 8px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s;
}

.vm-btn-secondary:hover {
  background: #f3f4f6;
}

.vm-btn-primary {
  padding: 8px 16px;
  border: 1px solid #C41230;
  border-radius: 6px;
  background: #C41230;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  transition: all 0.15s;
}

.vm-btn-primary:hover {
  background: #a30f28;
  border-color: #a30f28;
}
