/* Overlay — centered, blurs content below */
.open-project-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  backdrop-filter: blur(2px);
}

/* Open Project Panel — centered dialog */
.open-project-panel {
  background-color: #2d2d2d;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  width: 90%;
  max-width: 700px;
  height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: openProjectFadeIn 0.2s ease-out;
}

@keyframes openProjectFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes openProjectFadeOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }

  to {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }
}

@keyframes openProjectOverlayFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.open-project-overlay-closing {
  animation: openProjectOverlayFadeOut 0.15s ease-in forwards;
}

.open-project-panel-closing {
  animation: openProjectFadeOut 0.15s ease-in forwards;
}

/* Header */
.open-project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background-color: #252525;
  flex-shrink: 0;
}

.open-project-title {
  color: #e0e0e0;
  font-size: 16px;
  padding-left: 10px;
  font-weight: bold;
  margin: 0;
}

.open-project-close-btn {
  background: transparent;
  border: none;
  color: #b0b0b0;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
}

.open-project-close-btn:hover {
  background-color: #3a3a3a;
  color: #e0e0e0;
}

/* Filter bar — sticky at top */
.open-project-filter {
  padding: 0px 12px 10px 12px;
  background-color: #252525;
  flex-shrink: 0;
}

.open-project-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.open-project-filter input {
  flex: 1;
  padding: 6px 10px;
  background-color: #1e1e1e;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  color: #e0e0e0;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}

.open-project-filter input:focus {
  border-color: #5a9fd4;
}

.open-project-filter input::placeholder {
  color: #777;
}

/* View toggle (Projects / Trash) */
.open-project-view-toggle {
  display: flex;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.open-project-toggle-btn {
  background-color: #1e1e1e;
  color: #999;
  border: none;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.open-project-toggle-btn:hover {
  color: #e0e0e0;
}

.open-project-toggle-btn.active {
  background-color: #5a9fd4;
  color: #fff;
}

/* Trash hint banner */
.open-project-trash-hint {
  padding: 6px 12px;
  background-color: #3a2a1a;
  color: #d4a054;
  font-size: 11px;
  flex-shrink: 0;
}

/* Sort header row */
.open-project-sort-header {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  background-color: #252525;
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
  user-select: none;
  flex-shrink: 0;
}

.open-project-sort-col {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  border-radius: 3px;
}

.open-project-sort-col:hover {
  color: #e0e0e0;
  background-color: #3a3a3a;
}

.open-project-sort-col.active {
  color: #5a9fd4;
}

.open-project-sort-col-name {
  flex: 1;
}

.open-project-sort-col-created,
.open-project-sort-col-updated {
  width: 160px;
  text-align: left;
}

/* Scrollable project list */
.open-project-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Individual project row */
.open-project-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  transition: background-color 0.1s;
}

.open-project-item:hover {
  background-color: #353535;
}

.open-project-item-info {
  flex: 1;
  min-width: 0;
}

.open-project-item-name {
  font-size: 14px;
  color: #e0e0e0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.open-project-item-meta {
  font-size: 11px;
  color: #888;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Action buttons container */
.open-project-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 10px;
}

/* Open button */
.open-project-item-open-btn {
  background-color: #5a9fd4;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.open-project-item-open-btn:hover {
  background-color: #4a8fc4;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(90, 159, 212, 0.3);
}

/* Icon action buttons (duplicate, delete, restore, perm-delete) */
.open-project-item-action-btn {
  background: transparent;
  border: 1px solid #555;
  border-radius: 6px;
  color: #bbb;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.open-project-item-action-btn:hover {
  background-color: #444;
  color: #e0e0e0;
  border-color: #777;
}

.open-project-item-delete-btn:hover {
  background-color: #5a2020;
  color: #ff6666;
  border-color: #ff4444;
}

.open-project-item-permdelete-btn:hover {
  background-color: #7a1010;
  color: #ff4444;
  border-color: #ff2222;
}

.open-project-item-restore-btn:hover {
  background-color: #1a3a2a;
  color: #66cc88;
  border-color: #44aa66;
}

/* Loading and empty states */
.open-project-loading,
.open-project-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: #888;
  font-size: 14px;
  padding: 40px;
}