/* Workspace Admin Management Styles */

.admin-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.admin-modal {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.admin-modal .modal-header {
  padding: 24px 24px 0 24px;
  border-bottom: 1px solid #f3f4f6;
  position: relative;
}

.admin-modal .modal-header h2 {
  margin: 0 0 4px 0;
  font-size: 24px;
  font-weight: 600;
  color: #111827;
}

.admin-modal .modal-subtitle {
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 20px;
}

.admin-modal .close-modal {
  position: absolute;
  right: 24px;
  top: 24px;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.admin-modal .close-modal:hover {
  color: #374151;
  background: #f3f4f6;
}

.admin-modal .modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.admin-section {
  margin-bottom: 32px;
}

.admin-section:last-child {
  margin-bottom: 0;
}

.admin-section h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

/* Current Admins Section */
.current-admins {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.no-admins {
  padding: 32px 24px;
  text-align: center;
  background: #f9fafb;
}

.no-admins-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.no-admins-text {
  font-size: 16px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 4px;
}

.no-admins-subtitle {
  font-size: 14px;
  color: #6b7280;
}

.admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f3f4f6;
  background: white;
  transition: background-color 0.2s ease;
}

.admin-item:last-child {
  border-bottom: none;
}

.admin-item:hover {
  background: #f9fafb;
}

.admin-info {
  flex: 1;
}

.admin-name {
  font-size: 15px;
  font-weight: 500;
  color: #111827;
  margin-bottom: 4px;
}

.admin-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-email {
  font-size: 13px;
  color: #6b7280;
}

.admin-workspace {
  font-size: 12px;
  color: #9ca3af;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-block;
  max-width: fit-content;
}

.remove-admin {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  opacity: 0.7;
}

.remove-admin:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.1);
}

/* Form Controls */
.form-group {
  margin-bottom: 20px;
}

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

.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-controls {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
}

/* Loading States */
.loading-skeleton {
  padding: 20px;
}

.skeleton-item {
  height: 60px;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 6px;
  margin-bottom: 12px;
}

.skeleton-item:last-child {
  margin-bottom: 0;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Modal Footer */
.admin-modal .modal-footer {
  padding: 20px 24px;
  border-top: 1px solid #f3f4f6;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-outline {
  background: white;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-outline:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #9ca3af;
}

.btn-primary {
  background: #2563eb;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #1d4ed8;
}

/* Responsive Design */
@media (max-width: 768px) {
  .admin-modal-overlay {
    padding: 12px;
  }

  .admin-modal {
    max-width: none;
    width: 100%;
    max-height: 95vh;
  }

  .admin-modal .modal-header {
    padding: 16px 16px 0 16px;
  }

  .admin-modal .modal-body {
    padding: 16px;
  }

  .admin-modal .modal-footer {
    padding: 16px;
    flex-direction: column-reverse;
  }

  .admin-modal .modal-footer .btn {
    width: 100%;
  }

  .admin-item {
    padding: 12px 16px;
  }

  .admin-details {
    gap: 4px;
  }

  .admin-workspace {
    margin-top: 4px;
  }
}

@media (max-width: 480px) {
  .admin-modal .modal-header h2 {
    font-size: 20px;
  }

  .admin-section h3 {
    font-size: 16px;
  }

  .admin-section {
    margin-bottom: 24px;
  }
}
