/* Folder Management Styles */

.folders-section {
  margin-bottom: 20px;
  padding: 12px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
}

.folders-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.2s;
}

.folders-header:hover {
  background: rgba(255,255,255,0.08);
}

.folders-title {
  font-weight: 600;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #333 !important;
}

.folders-actions {
  display: flex;
  gap: 8px;
}

.folder-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1em;
  transition: all 0.2s;
}

.folder-btn:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.1);
}

.folders-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 300px;
  overflow-y: auto;
}

.folders-list.collapsed {
  display: none;
}

.folder-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(255,255,255,0.05);
  position: relative;
  color: #333 !important; /* Dark text for visibility */
  font-weight: 500;
}

.folder-item:hover {
  background: rgba(255,255,255,0.12);
  transform: translateX(2px);
}

.folder-item.active {
  background: rgba(255,255,255,0.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.folder-icon {
  font-size: 1.2em;
  min-width: 20px;
  text-align: center;
}

.folder-name {
  flex: 1;
  font-size: 0.9em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #333 !important;
  font-weight: 500;
}

.folder-count {
  font-size: 0.75em;
  background: rgba(255,255,255,0.2);
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.folder-actions {
  display: none;
  gap: 4px;
}

.folder-item:hover .folder-actions {
  display: flex;
}

.folder-action-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8em;
  transition: all 0.2s;
}

.folder-action-btn:hover {
  background: rgba(255,255,255,0.3);
}

/* Multi-Select */
.multi-select-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 12px 24px;
  border-radius: 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 1000;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateX(-50%) translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

.multi-select-info {
  font-weight: 600;
  color: white;
}

.multi-select-actions {
  display: flex;
  gap: 8px;
}

.multi-select-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.multi-select-btn:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}

.multi-select-btn.danger {
  background: rgba(239, 68, 68, 0.8);
}

.multi-select-btn.danger:hover {
  background: rgba(239, 68, 68, 1);
}

/* Conversation checkbox for multi-select */
.conv-checkbox {
  display: none;
  min-width: 20px;
  min-height: 20px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #667eea;
}

.multi-select-mode .conv-checkbox {
  display: block;
}

.multi-select-mode .conv-item {
  padding-left: 8px;
}

/* Modal styles */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: white;
  border-radius: 12px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 16px;
  color: #333;
}

.modal-body {
  margin-bottom: 20px;
  color: #666;
}

.modal-input {
  width: 100%;
  padding: 10px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 1em;
  transition: border 0.2s;
}

.modal-input:focus {
  outline: none;
  border-color: #667eea;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.modal-btn.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.modal-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.modal-btn.secondary {
  background: #e0e0e0;
  color: #333;
}

.modal-btn.secondary:hover {
  background: #d0d0d0;
}

.modal-btn.danger {
  background: #ef4444;
  color: white;
}

.modal-btn.danger:hover {
  background: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Color picker */
.color-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.color-option {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.2s;
}

.color-option:hover {
  transform: scale(1.1);
}

.color-option.selected {
  border-color: white;
  box-shadow: 0 0 0 2px #667eea;
}

/* Icon picker */
.icon-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.icon-option {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  cursor: pointer;
  border-radius: 6px;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.icon-option:hover {
  background: #f0f0f0;
}

.icon-option.selected {
  border-color: #667eea;
  background: #e8edff;
}
