/* ActivitySystem Styles */

/* ActivityIcon Button */
#activity-icon {
  position: relative;
  display: inline-block;
  cursor: pointer;
  margin-top: 60px;
  color: #010623;
  background-color: #fff;
  border-radius: 5px;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  aspect-ratio: 1;
  display: grid;
  border: none;
  place-items: center;
  z-index: 1005;
  position: absolute;
  top: 7rem;
  left: 1rem;
}

#activity-icon svg {
  width: 34px;
  height: 34px;
}

#activity-icon.active {
  background-color: #0085ff !important;
}

#activity-icon.active .activity-icon-outer {
  fill: #fff !important;
  stroke: #fff !important;
}

#activity-icon.active .activity-icon-inner {
  fill: #0085ff !important;
}

#activity-icon.active .activity-icon-i {
  fill: #fff !important;
}

#activity-icon .tooltip {
  visibility: hidden;
  width: 220px;
  padding: 5px;
  font-size: 12px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 5px;
  position: absolute;
  left: 110%;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.3s;
}

#activity-icon:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

/* ActivityMenu Panel */
.activity-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 0;
  height: 100vh;
  background: #f9f9f9;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  overflow: hidden; /* Prevent entire panel from scrolling */
  z-index: 999999;
  transition: width 0.3s ease;
  display: flex;
  flex-direction: column;
}

.activity-menu.visible {
  border-left: 1px solid #ccc;
}

.activity-menu .menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  padding-bottom: 16px;
  font-size: 18px;
  color: #000;
  font-weight: 600;
  flex: 0 0 auto; /* Don't grow or shrink, stay fixed */
}

.activity-menu .menu-header h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

#close-activity-menu {
  background-color: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  touch-action: manipulation; /* Improve touch responsiveness */
  -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

#close-activity-menu:hover {
  opacity: 0.7;
}

#close-activity-menu:active {
  opacity: 0.5;
}

/* ActivityTools Section */
.activity-tools {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 24px 24px 24px;
  transition: opacity 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
}

/* Global Visibility Toggle */
.activity-global-visibility {
  padding: 12px 0;
  flex: 0 0 auto; /* Don't grow or shrink */
}

.activity-visibility-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.activity-visibility-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #0085ff;
}

.activity-visibility-toggle span {
  font-size: 14px;
  font-weight: 500;
  color: #010623;
}

.activity-visibility-toggle:hover span {
  color: #0085ff;
}

/* Create Activity Button Row (main + 3D sub-button) */
.activity-create-btn-row {
  display: flex;
  align-items: stretch;
  border-radius: 5px;
  overflow: hidden;
  flex: 0 0 auto;
  height: 48px;
  border: 1px solid #0085ff;
}

.activity-create-btn {
  flex: 1;
  height: 100%;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  gap: 9px;
  background-color: #0085ff;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s;
}

.activity-create-btn:hover {
  background-color: #0070dd;
}

.activity-create-btn.active {
  background-color: #28a745;
}

.activity-create-btn.active:hover {
  background-color: #218838;
}

.activity-create-btn-row:has(.activity-create-btn.active) {
  border-color: #28a745;
}

.activity-create-btn-3d {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  background-color: #f0f0f0;
  color: #555;
  border: none;
  border-left: 1px solid #0085ff;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.activity-create-btn-3d:hover {
  background-color: #e4ecf5;
  color: #0085ff;
}

.activity-create-btn-3d:active {
  background-color: #d0dff0;
  transform: scale(0.95);
}

.activity-create-btn-3d svg {
  display: block;
}

.activity-create-btn-row:has(.activity-create-btn.active) .activity-create-btn-3d {
  border-left-color: #28a745;
}

/* ActivityList Filters (search + category stacked vertically inside list container) */
.activity-list-filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

/* ActivitySearch Container */
.activity-search-container {
  position: relative;
  width: 100%;
}

.activity-search-input {
  width: 100%;
  height: 36px;
  padding: 6px 32px 6px 10px;
  border: 1px solid #e1e2e6;
  border-radius: 5px;
  font-size: 12px;
  font-family: "Poppins", sans-serif;
  color: #010623;
  background-color: #fff;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.activity-search-input:focus {
  outline: none;
  border-color: #0085ff;
}

.activity-search-input::placeholder {
  color: #9ca3af;
}

.activity-search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #676a7b;
  pointer-events: none;
  width: 14px;
  height: 14px;
}

/* ActivityList Container */
.activity-list-container {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  border: 1px solid #e1e2e6;
  border-radius: 5px;
  background-color: #fff;
  padding: 12px;
  min-height: 180px;
  overflow: hidden;
  flex: 1;
}

.activity-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.activity-list-header h4 {
  font-size: 14px;
  font-weight: 600;
  color: #010623;
  margin: 0;
}

.activity-list-expand-btn {
  background: none;
  border: 1px solid #e1e2e6;
  border-radius: 4px;
  cursor: pointer;
  color: #676a7b;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.activity-list-expand-btn:hover {
  color: #0085ff;
  border-color: #0085ff;
  background-color: #e4ecf5;
}

/* ActivityList */
.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 80px;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  touch-action: pan-y; /* Allow vertical scrolling on touch devices */
}

.activity-list > li {
  margin-bottom: 6px;
}

.activity-list > li:last-child {
  margin-bottom: 0;
}

.activity-list-empty {
  padding: 16px;
  text-align: center;
  color: #676a7b;
  font-size: 12px;
  background-color: #f8f8f8;
  border-radius: 5px;
}

.activity-list-item {
  display: flex;
  align-items: stretch;
  gap: 8px;
  background-color: #fff;
  border: 1px solid #e1e2e6;
  border-radius: 5px;
  transition: all 0.2s;
  overflow: hidden;
  flex-shrink: 0; /* Prevent items from being squeezed */
  height: 60px; /* Fixed height for consistent appearance */
}

.activity-list-item:hover {
  background-color: #e4ecf5;
  border-color: #0085ff;
}

.activity-list-content {
  flex: 1;
  padding: 6px;
  cursor: pointer;
  min-width: 0; /* Allow flex item to shrink below content size */
  overflow: hidden; /* Prevent content from overflowing */
}

.activity-list-content:hover {
  background-color: rgba(0, 133, 255, 0.05);
}

.activity-list-title {
  font-size: 12px;
  font-weight: 600;
  color: #010623;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.activity-local-badge {
  display: inline-block;
  font-size: 8px;
  font-weight: 600;
  padding: 1px 4px;
  margin-left: 0;
  background-color: #ff8c00;
  color: #fff;
  border-radius: 2px;
  text-transform: uppercase;
  vertical-align: middle;
  cursor: help;
}

.activity-id-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 500;
  padding: 2px 6px;
  margin-left: 0;
  background-color: #e8f4fd;
  color: #0085ff;
  border-radius: 3px;
  font-family: "Courier New", monospace;
  vertical-align: middle;
  cursor: help;
  border: 1px solid #d0e8f7;
}

.activity-list-preview {
  font-size: 11px;
  color: #676a7b;
  margin-bottom: 3px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.activity-list-meta {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #999;
  flex-wrap: wrap;
}

.activity-list-date {
  font-size: 10px;
}

.activity-list-assignee {
  font-size: 10px;
  color: #0085ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

/* Go to Activity Button */
.activity-goto-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background-color: #0085ff;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 11px;
  font-weight: 500;
  min-width: 40px;
  flex-shrink: 0;
}

.activity-goto-btn:hover {
  background-color: #0070dd;
}

.activity-goto-btn:active {
  background-color: #005bb5;
  transform: scale(0.95);
}

.activity-goto-btn svg {
  display: block;
}

/* ActivityModal */
.activity-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000000;
}

.activity-modal-content {
  background: #fff;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.activity-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e1e2e6;
}

.activity-modal-title-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.activity-modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #010623;
  margin: 0;
}

.activity-modal-id {
  font-size: 11px;
  color: #676a7b;
  font-family: "Courier New", monospace;
  cursor: help;
}

.activity-modal-header > button,
.activity-modal-header .activity-modal-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #676a7b;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.activity-modal-header > button:hover,
.activity-modal-header .activity-modal-close-btn:hover {
  color: #010623;
}

.activity-modal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.activity-share-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  background: #0085ff;
  border: 1px solid #0085ff;
  border-radius: 6px;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  white-space: nowrap;
  transition: all 0.2s;
  line-height: 1;
}

.activity-share-btn svg {
  flex-shrink: 0;
}

.activity-share-btn:hover {
  background: #0070dd;
  border-color: #0070dd;
  color: #fff;
}

.activity-modal-close-btn {
  flex-shrink: 0;
  border-radius: 4px;
  transition: all 0.2s;
}

.activity-modal-close-btn:hover {
  background-color: #f0f0f0;
}

.activity-position-section {
  margin-top: 8px;
}

.activity-position-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.activity-position-status {
  font-size: 12px;
  color: #676a7b;
  flex: 1;
  min-width: 0;
}

.activity-select-position-btn {
  padding: 6px 12px;
  font-size: 12px;
  background: #f0f0f0;
  border: 1px solid #e1e2e6;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}

.activity-select-position-btn:hover {
  background: #e4ecf5;
  border-color: #0085ff;
}

.activity-status-select,
.activity-priority-select,
.activity-assignee-select {
  width: 100%;
  padding: 6px 8px;
  font-size: 12px;
  border: 1px solid #e1e2e6;
  border-radius: 6px;
}

.activity-deadline-input {
  width: 100%;
  padding: 6px 8px;
  font-size: 12px;
  border: 1px solid #e1e2e6;
  border-radius: 6px;
  box-sizing: border-box;
}

.activity-goto-btn-disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  color: #ccc;
  cursor: default;
  font-size: 14px;
}

/* Accessibility dialog (visibility + permissions) */
.activity-accessibility-dialog .activity-modal-content {
  max-width: 460px;
  overflow: visible;
}

.activity-accessibility-dialog-content {
  max-width: 460px;
}

.activity-accessibility-dialog-body {
  padding: 16px 24px 24px;
}

/* Visibility toggle section */
.activity-accessibility-visibility-section {
  margin-bottom: 4px;
}

.activity-accessibility-visibility-label {
  font-size: 13px;
  font-weight: 600;
  color: #2d2e33;
  margin-bottom: 8px;
  display: block;
}

.activity-accessibility-visibility-toggle {
  display: flex;
  gap: 0;
  border: 1px solid #e1e2e6;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 6px;
}

.activity-visibility-toggle-btn {
  flex: 1;
  padding: 8px 16px;
  font-size: 13px;
  font-family: inherit;
  border: none;
  background: #f5f6f8;
  color: #676a7b;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}

.activity-visibility-toggle-btn.active {
  background: #0085ff;
  color: #fff;
  font-weight: 500;
}

.activity-visibility-toggle-btn:hover:not(.active) {
  background: #ebedf0;
}

.activity-accessibility-visibility-hint {
  font-size: 11px;
  color: #676a7b;
  margin: 0;
}

.activity-accessibility-divider {
  border: none;
  border-top: 1px solid #e1e2e6;
  margin: 14px 0;
}

/* Share label */
.activity-accessibility-share-label {
  font-size: 13px;
  font-weight: 600;
  color: #2d2e33;
  margin-bottom: 8px;
  display: block;
}

/* Add user row */
.activity-share-add-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.activity-share-autocomplete-wrapper {
  flex: 1;
  min-width: 140px;
  position: relative;
}

.activity-share-user-input {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid #e1e2e6;
  border-radius: 6px;
  box-sizing: border-box;
}

.activity-share-autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e1e2e6;
  border-top: none;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  list-style: none;
  margin: 0;
  padding: 0;
}

.activity-share-autocomplete-item {
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
  color: #2d2e33;
}

.activity-share-autocomplete-item:hover {
  background: #f0f5ff;
}

.activity-share-role-select {
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid #e1e2e6;
  border-radius: 6px;
  min-width: 120px;
}

.activity-share-add-btn {
  padding: 8px 14px;
  font-size: 13px;
  background: #0085ff;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}

.activity-share-add-btn:hover {
  background: #0070dd;
}

/* Permissions list */
.activity-share-permissions-list {
  list-style: none;
  margin: 0 0 12px 0;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
}

.activity-share-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-size: 13px;
}

.activity-share-item-pending {
  opacity: 0.7;
}

.activity-share-item-pending em {
  font-size: 11px;
  color: #999;
}

.activity-share-item-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-share-item-role {
  padding: 4px 8px;
  font-size: 12px;
  border: 1px solid #e1e2e6;
  border-radius: 4px;
}

.activity-share-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #676a7b;
  font-size: 18px;
  padding: 0 4px;
  line-height: 1;
}

.activity-share-remove:hover {
  color: #c00;
}

.activity-share-loading,
.activity-share-error,
.activity-share-empty {
  padding: 12px;
  color: #676a7b;
  font-size: 13px;
}

.activity-share-error {
  color: #c00;
}

.activity-share-hint {
  font-size: 11px;
  color: #676a7b;
  margin: 0;
}

/* ActivityAlert / Confirm dialogs (replace browser alert/confirm) */
.activity-dialog-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000001;
  font-family: "Poppins", sans-serif;
}

.activity-dialog-modal .activity-dialog-content {
  background: #fff;
  border-radius: 8px;
  width: 90%;
  max-width: 420px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.activity-dialog-modal .activity-dialog-title {
  font-size: 18px;
  font-weight: 600;
  color: #010623;
  margin: 0 0 12px 0;
}

.activity-dialog-modal .activity-dialog-message {
  font-size: 14px;
  color: #333;
  line-height: 1.5;
  margin: 0 0 20px 0;
  white-space: pre-line;
}

.activity-dialog-modal .activity-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.activity-dialog-modal .activity-dialog-btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.activity-dialog-modal .activity-dialog-btn-primary {
  background: #0085ff;
  color: #fff;
}

.activity-dialog-modal .activity-dialog-btn-primary:hover {
  background: #0070dd;
}

.activity-dialog-modal .activity-dialog-btn-secondary {
  background: #f0f0f0;
  color: #333;
}

.activity-dialog-modal .activity-dialog-btn-secondary:hover {
  background: #e1e2e6;
}

/* ActivityForm */
#activity-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#activity-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #010623;
  margin-bottom: 6px;
}

#activity-form input[type="text"],
#activity-form textarea,
#activity-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e1e2e6;
  border-radius: 5px;
  font-size: 13px;
  font-family: "Poppins", sans-serif;
  color: #010623;
  box-sizing: border-box;
  background-color: #fff;
}

#activity-form input[type="text"]:focus,
#activity-form textarea:focus,
#activity-form select:focus {
  outline: none;
  border-color: #0085ff;
}

#activity-form textarea {
  resize: vertical;
  min-height: 80px;
}

#activity-form select {
  cursor: pointer;
  appearance: auto;
}

/* Form Actions */
.activity-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.activity-form-actions button {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.activity-form-actions button[type="submit"] {
  background-color: #0085ff;
  color: #fff;
}

.activity-form-actions button[type="submit"]:hover {
  background-color: #0070dd;
}

.activity-form-actions button[type="button"] {
  background-color: #e1e2e6;
  color: #010623;
}

.activity-form-actions button[type="button"]:hover {
  background-color: #d0d1d5;
}

.activity-form-actions .activity-delete-btn {
  background-color: #dc3545;
  color: #fff;
  flex: 0 0 auto;
  min-width: 80px;
}

.activity-form-actions .activity-delete-btn:hover {
  background-color: #c82333;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .activity-menu {
    width: 0 !important;
  }

  .activity-menu.visible {
    width: 100vw !important;
  }

  #activity-icon {
    /* Match desktop spacing on mobile */
    top: 6.75rem !important;
  }

  /* Make close button larger and more touch-friendly on mobile */
  #close-activity-menu {
    padding: 8px;
    min-width: 44px; /* Minimum touch target size */
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #close-activity-menu svg {
    width: 20px;
    height: 20px;
  }

  .activity-modal-content {
    width: 95%;
    max-width: none;
  }

  #activity-form {
    padding: 16px;
  }

  .activity-form-actions {
    flex-direction: column;
  }

  .activity-form-actions button {
    width: 100%;
  }
}

/* ActivityFiles Section */
.activity-files-section {
  margin-top: 8px;
}

.activity-files-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.activity-upload-file-btn,
.activity-select-file-btn {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #e1e2e6;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  background-color: #f8f9fa;
  color: #010623;
  transition: all 0.2s;
}

.activity-upload-file-btn:hover,
.activity-select-file-btn:hover {
  background-color: #e9ecef;
  border-color: #0085ff;
}

.activity-files-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 8px;
  background-color: #f8f9fa;
  border-radius: 5px;
  border: 1px solid #e1e2e6;
}

.activity-files-empty {
  text-align: center;
  color: #676a7b;
  font-size: 12px;
  padding: 12px;
}

.activity-file-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background-color: #fff;
  border-radius: 4px;
  border: 1px solid #e1e2e6;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.activity-file-item:hover {
  background-color: #f8f9fa;
  border-color: #007bff;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
}

.activity-file-item:active {
  transform: scale(0.99);
}

.activity-file-name {
  font-size: 13px;
  font-weight: 500;
  color: #010623;
  word-break: break-word;
}

.activity-file-path {
  font-size: 11px;
  color: #676a7b;
  font-family: "Courier New", monospace;
  word-break: break-all;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-file-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: none;
  border: none;
  font-size: 18px;
  color: #dc3545;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 3px;
  transition: all 0.2s;
}

.activity-file-remove:hover {
  background-color: #f8d7da;
  color: #c82333;
}

/* Collapsible Section (Reminder & Periodicity) */
.activity-collapsible-section {
  border: 1px solid #e1e2e6;
  border-radius: 5px;
  overflow: hidden;
}

.activity-collapsible-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  background: #f9f9f9;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #010623;
  transition: background-color 0.2s;
}

.activity-collapsible-toggle:hover {
  background: #f0f0f0;
}

.activity-collapsible-chevron {
  transition: transform 0.2s;
  flex-shrink: 0;
}

.activity-collapsible-section.open .activity-collapsible-chevron {
  transform: rotate(90deg);
}

.activity-collapsible-content {
  display: none;
  padding: 12px;
  gap: 12px;
  flex-direction: column;
  border-top: 1px solid #e1e2e6;
}

.activity-collapsible-section.open .activity-collapsible-content {
  display: flex;
}

.activity-collapsible-content label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #010623;
  margin-bottom: 6px;
}

.activity-collapsible-content select,
.activity-collapsible-content input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e1e2e6;
  border-radius: 5px;
  font-size: 13px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.activity-collapsible-content select:focus,
.activity-collapsible-content input[type="number"]:focus {
  outline: none;
  border-color: #0085ff;
}

/* Linked Activities Section */
.activity-linked-activities-section {
  margin-top: 8px;
}

.activity-link-activity-btn {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e1e2e6;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  background-color: #f8f9fa;
  color: #010623;
  transition: all 0.2s;
  margin-bottom: 8px;
}

.activity-link-activity-btn:hover {
  background-color: #e9ecef;
  border-color: #0085ff;
}

/* Link Activity Selection Dialog */
.activity-link-activity-dialog {
  z-index: 10000001;
}

.activity-link-activity-dialog-content {
  max-width: 460px;
  width: 90vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.activity-link-activity-dialog-body {
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

.activity-link-activity-filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.activity-link-activity-filters input,
.activity-link-activity-filters select {
  width: 100%;
  height: 36px;
  padding: 6px 10px;
  border: 1px solid #e1e2e6;
  border-radius: 5px;
  font-size: 12px;
  color: #010623;
  background-color: #fff;
  box-sizing: border-box;
}

.activity-link-activity-filters input:focus,
.activity-link-activity-filters select:focus {
  outline: none;
  border-color: #0085ff;
}

.activity-link-activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  max-height: 350px;
  min-height: 100px;
}

.activity-link-activity-list-empty {
  text-align: center;
  color: #676a7b;
  font-size: 12px;
  padding: 24px 12px;
}

.activity-link-activity-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  border: 1px solid #e1e2e6;
  border-radius: 5px;
  margin-bottom: 6px;
  transition: all 0.2s;
  background-color: #fff;
}

.activity-link-activity-list-item:hover {
  background-color: #e4ecf5;
  border-color: #0085ff;
}

.activity-link-activity-list-item-number {
  font-weight: 600;
  font-size: 12px;
  color: #0085ff;
  white-space: nowrap;
}

.activity-link-activity-list-item-title {
  flex: 1;
  font-size: 12px;
  font-weight: 500;
  color: #010623;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-link-activity-list-item-type {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 500;
  white-space: nowrap;
}

.activity-link-activity-list-item-type.type-task {
  background-color: #fff3cd;
  color: #856404;
}

.activity-link-activity-list-item-type.type-info {
  background-color: #d1ecf1;
  color: #0c5460;
}

/* Expanded Activity List Dialog */
.activity-expanded-list-dialog {
  z-index: 10000001;
}

.activity-expanded-list-dialog-content {
  max-width: 560px;
  width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.activity-expanded-list-dialog-body {
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

.activity-expanded-list-filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.activity-expanded-list-filters input,
.activity-expanded-list-filters select {
  width: 100%;
  height: 36px;
  padding: 6px 10px;
  border: 1px solid #e1e2e6;
  border-radius: 5px;
  font-size: 12px;
  color: #010623;
  background-color: #fff;
  box-sizing: border-box;
}

.activity-expanded-list-filters input:focus,
.activity-expanded-list-filters select:focus {
  outline: none;
  border-color: #0085ff;
}

.activity-expanded-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
  min-height: 100px;
}

.activity-expanded-list-empty {
  text-align: center;
  color: #676a7b;
  font-size: 12px;
  padding: 24px 12px;
}

.activity-expanded-list-item {
  display: flex;
  align-items: stretch;
  gap: 8px;
  background-color: #fff;
  border: 1px solid #e1e2e6;
  border-radius: 5px;
  transition: all 0.2s;
  margin-bottom: 6px;
  min-height: 54px;
}

.activity-expanded-list-item:hover {
  background-color: #e4ecf5;
  border-color: #0085ff;
}

.activity-expanded-list-item-content {
  flex: 1;
  padding: 8px 10px;
  cursor: pointer;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.activity-expanded-list-item-title {
  font-size: 13px;
  font-weight: 600;
  color: #010623;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-expanded-list-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #999;
  flex-wrap: wrap;
}

.activity-expanded-list-item-goto {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background-color: #0085ff;
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 40px;
  flex-shrink: 0;
  border-radius: 0 5px 5px 0;
}

.activity-expanded-list-item-goto:hover {
  background-color: #0070dd;
}

.activity-expanded-list-item-goto-disabled {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  color: #ccc;
  cursor: default;
  flex-shrink: 0;
}

.activity-linked-activities-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 8px;
  background-color: #f8f9fa;
  border-radius: 5px;
  border: 1px solid #e1e2e6;
}

.activity-linked-activities-empty {
  text-align: center;
  color: #676a7b;
  font-size: 12px;
  padding: 12px;
}

.activity-linked-activity-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background-color: #fff;
  border-radius: 4px;
  border: 1px solid #e1e2e6;
  position: relative;
  cursor: default;
  transition: all 0.2s ease;
}

.activity-linked-activity-item:hover {
  background-color: #f8f9fa;
  border-color: #007bff;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
}

.activity-linked-activity-number {
  font-weight: 600;
  font-size: 12px;
  color: #0085ff;
  white-space: nowrap;
}

.activity-linked-activity-title {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: #010623;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-linked-activity-type {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 500;
  white-space: nowrap;
}

.activity-linked-activity-type.type-task {
  background-color: #fff3cd;
  color: #856404;
}

.activity-linked-activity-type.type-info {
  background-color: #d1ecf1;
  color: #0c5460;
}

.activity-linked-activity-remove {
  background: none;
  border: none;
  font-size: 18px;
  color: #dc3545;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  border-radius: 3px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.activity-linked-activity-remove:hover {
  background-color: #f8d7da;
  color: #c82333;
}

/* File Manager Modal */
.activity-file-manager-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000001;
}

.activity-file-manager-content {
  background: #fff;
  border-radius: 8px;
  width: 90%;
  max-width: 900px;
  height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.activity-file-manager-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e1e2e6;
}

.activity-file-manager-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #010623;
  margin: 0;
}

.activity-file-manager-header button {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #676a7b;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.activity-file-manager-header button:hover {
  color: #010623;
}

.activity-file-manager-iframe {
  flex: 1;
  width: 100%;
  border: none;
  border-radius: 0 0 8px 8px;
}

@media (max-width: 768px) {
  .activity-files-actions {
    flex-direction: column;
  }

  .activity-file-manager-content {
    width: 95%;
    height: 90vh;
  }
}

/* Tablet Adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
  .activity-menu {
    width: 320px;
  }
}

/* ActivityHover Tooltip */
.activity-hover-tooltip {
  position: fixed;
  background-color: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  pointer-events: none;
  z-index: 10000;
  display: none;
}

.activity-tooltip-title {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
}

.activity-tooltip-text {
  font-size: 12px;
  font-weight: 400;
  color: #e0e0e0;
  margin-bottom: 4px;
  max-width: 280px;
  line-height: 1.35;
  word-wrap: break-word;
}

.activity-tooltip-id {
  font-size: 10px;
  color: #b0b0b0;
  font-family: "Courier New", monospace;
  font-weight: 400;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  font-family: "Poppins", sans-serif;
}

/* ActivityCreation Cancel Button (Mobile) */
.activity-creation-cancel-btn {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 24px;
  background-color: #dc3545;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  z-index: 10000000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  transition: all 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.activity-creation-cancel-btn:hover {
  background-color: #c82333;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.activity-creation-cancel-btn:active {
  transform: translateX(-50%) scale(0.95);
  background-color: #bd2130;
}

@media (min-width: 769px) {
  .activity-creation-cancel-btn {
    display: none !important;
  }
}

/* Collapsible Details Section (native <details>/<summary>) */
.activity-details-section {
  flex: 0 0 auto;
}

.activity-details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  user-select: none;
  padding: 8px 0;
  list-style: none;
}

.activity-details-header::-webkit-details-marker {
  display: none;
}

.activity-details-header::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 2px solid #676a7b;
  border-bottom: 2px solid #676a7b;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 8px;
}

.activity-details-section[open] > .activity-details-header::after {
  transform: rotate(45deg);
}

.activity-details-content {
  padding-top: 4px;
  padding-bottom: 4px;
}

/* ActivityFilter Controls */
.activity-filter-controls {
  padding: 0;
  margin-top: 8px;
  border-top: 1px solid #e1e2e6;
  border-bottom: 1px solid #e1e2e6;
}

.activity-filter-controls > .activity-details-header {
  padding: 8px 0;
}

/* Activity List Filters Section */
.activity-list-filters-section {
  margin-bottom: 8px;
  border-bottom: 1px solid #e1e2e6;
}

.activity-list-filters-section > .activity-details-header {
  padding: 6px 0;
}

.activity-list-filters-section .activity-apply-3d-row {
  margin-bottom: 8px;
  padding-bottom: 8px;
}

.activity-filter-row {
  margin-bottom: 12px;
}

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

.activity-filter-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
  font-family: "Poppins", sans-serif;
}

.activity-distance-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #ddd;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.activity-distance-slider:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.activity-distance-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffa500;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.activity-distance-slider:disabled::-webkit-slider-thumb {
  cursor: not-allowed;
  background: #999;
}

.activity-distance-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.activity-distance-slider:disabled::-webkit-slider-thumb:hover {
  transform: scale(1);
}

.activity-distance-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffa500;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease;
}

.activity-distance-slider:disabled::-moz-range-thumb {
  cursor: not-allowed;
  background: #999;
}

.activity-distance-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
}

.activity-distance-slider:disabled::-moz-range-thumb:hover {
  transform: scale(1);
}

.activity-distance-filter,
.activity-floor-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #333;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  user-select: none;
}

.activity-distance-filter input[type="checkbox"],
.activity-floor-filter input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #ffa500;
}

/* Category Filter Select (stacked in list filters) */
.activity-category-filter-select {
  width: 100%;
  height: 36px;
  padding: 6px 10px;
  border: 1px solid #e1e2e6;
  border-radius: 5px;
  font-size: 12px;
  font-family: "Poppins", sans-serif;
  color: #010623;
  background-color: #fff;
  cursor: pointer;
  appearance: auto;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.activity-category-filter-select:focus {
  outline: none;
  border-color: #0085ff;
}

.activity-category-filter-select:hover {
  border-color: #0085ff;
}

.activity-category-description-hint {
  margin: 4px 0 0;
  font-size: 11px;
  color: #6b7280;
  line-height: 1.4;
  min-height: 0;
}

/* Apply to 3D View Filter Row (inside list container) */
.activity-apply-3d-row {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e1e2e6;
}

.activity-apply-3d-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #333;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  user-select: none;
}

.activity-apply-3d-filter input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #0085ff;
}

.activity-apply-3d-filter:hover span {
  color: #0085ff;
}
