/**
 * ProRank Design System - Agency Hub Feature Styles
 * 
 * Specific styles for Agency Hub functionality including white label,
 * user management, collaboration, SEO simulator, and roadmaps.
 * 
 * @module features/agency-hub
 * @since 3.0.0
 */

/* ============================================
   AGENCY HUB LAYOUT
   Main container and navigation styles
   ============================================ */

.prorank-agency-hub {
  /* Inherits from core layout */
}

.prorank-agency-header {
  margin-bottom: var(--prorank-spacing-lg);
  padding-bottom: var(--prorank-spacing-md);
  border-bottom: 1px solid var(--prorank-border);
}

.prorank-agency-description {
  color: var(--prorank-text-secondary);
  margin-top: var(--prorank-spacing-xs);
}

/* ============================================
   WHITE LABEL SETTINGS
   Custom branding configuration styles
   ============================================ */

.prorank-white-label-section {
  padding: var(--prorank-spacing-lg);
}

.prorank-white-label-preview {
  background: var(--prorank-bg-secondary);
  border: 1px solid var(--prorank-border);
  border-radius: var(--prorank-radius);
  padding: var(--prorank-spacing-md);
  margin-top: var(--prorank-spacing-md);
}

.prorank-white-label-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--prorank-spacing-md);
  padding-bottom: var(--prorank-spacing-sm);
  border-bottom: 1px solid var(--prorank-border);
}

.prorank-white-label-logo-upload {
  display: flex;
  align-items: center;
  gap: var(--prorank-spacing-md);
  padding: var(--prorank-spacing-md);
  background: var(--prorank-bg-tertiary);
  border-radius: var(--prorank-radius);
}

.prorank-white-label-logo-preview {
  width: 120px;
  height: 60px;
  object-fit: contain;
  border: 1px solid var(--prorank-border);
  border-radius: var(--prorank-radius-sm);
  padding: var(--prorank-spacing-xs);
  background: white;
}

.prorank-color-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--prorank-spacing-sm);
  margin-top: var(--prorank-spacing-md);
}

.prorank-color-preset-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--prorank-spacing-sm);
  border: 2px solid transparent;
  border-radius: var(--prorank-radius);
  cursor: pointer;
  transition: var(--prorank-transition);
}

.prorank-color-preset-item:hover {
  border-color: var(--prorank-primary);
  background: var(--prorank-bg-secondary);
}

.prorank-color-preset-item.is-active {
  border-color: var(--prorank-primary);
  background: var(--prorank-primary-light);
}

.prorank-color-preset-swatch {
  display: flex;
  gap: 2px;
  margin-bottom: var(--prorank-spacing-xs);
}

.prorank-color-preset-color {
  width: 20px;
  height: 20px;
  border-radius: var(--prorank-radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* ============================================
   USER MANAGEMENT
   User lists, roles, and permissions
   ============================================ */

.prorank-user-management {
  padding: var(--prorank-spacing-lg);
}

.prorank-user-filters {
  display: flex;
  gap: var(--prorank-spacing-md);
  margin-bottom: var(--prorank-spacing-lg);
  flex-wrap: wrap;
}

.prorank-user-table-wrapper {
  background: white;
  border: 1px solid var(--prorank-border);
  border-radius: var(--prorank-radius);
  overflow: hidden;
}

.prorank-user-row {
  display: grid;
  grid-template-columns: 40px 1fr 150px 150px 120px 100px;
  gap: var(--prorank-spacing-md);
  padding: var(--prorank-spacing-md);
  align-items: center;
  border-bottom: 1px solid var(--prorank-border-light);
  transition: var(--prorank-transition);
}

.prorank-user-row:hover {
  background: var(--prorank-bg-hover);
}

.prorank-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--prorank-border);
}

.prorank-user-info {
  display: flex;
  flex-direction: column;
  gap: var(--prorank-spacing-xs);
}

.prorank-user-name {
  font-weight: 600;
  color: var(--prorank-text);
}

.prorank-user-email {
  font-size: 0.875rem;
  color: var(--prorank-text-secondary);
}

.prorank-user-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: var(--prorank-primary-light);
  color: var(--prorank-primary);
  border-radius: var(--prorank-radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.prorank-user-status {
  display: inline-flex;
  align-items: center;
  gap: var(--prorank-spacing-xs);
}

.prorank-user-status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--prorank-success);
}

.prorank-user-status-indicator.is-inactive {
  background: var(--prorank-text-muted);
}

.prorank-user-actions {
  display: flex;
  gap: var(--prorank-spacing-xs);
  justify-content: flex-end;
}

/* ============================================
   COLLABORATION
   Real-time collaboration features
   ============================================ */

.prorank-collaboration-container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--prorank-spacing-lg);
}

.prorank-collaboration-main {
  background: white;
  border: 1px solid var(--prorank-border);
  border-radius: var(--prorank-radius);
  padding: var(--prorank-spacing-lg);
}

.prorank-collaboration-sidebar {
  background: var(--prorank-bg-secondary);
  border: 1px solid var(--prorank-border);
  border-radius: var(--prorank-radius);
  padding: var(--prorank-spacing-md);
  height: fit-content;
  position: sticky;
  top: var(--prorank-spacing-lg);
}

.prorank-active-users {
  margin-bottom: var(--prorank-spacing-lg);
}

.prorank-active-users-header {
  display: flex;
  align-items: center;
  gap: var(--prorank-spacing-sm);
  margin-bottom: var(--prorank-spacing-md);
  font-weight: 600;
}

.prorank-active-users-list {
  display: flex;
  flex-direction: column;
  gap: var(--prorank-spacing-sm);
}

.prorank-active-user-item {
  display: flex;
  align-items: center;
  gap: var(--prorank-spacing-sm);
  padding: var(--prorank-spacing-sm);
  background: white;
  border-radius: var(--prorank-radius);
  border: 1px solid var(--prorank-border-light);
}

.prorank-active-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--prorank-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--prorank-primary);
}

.prorank-active-user-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--prorank-success);
  margin-left: auto;
  animation: pulse 2s infinite;
}

/* ============================================
   SEO SIMULATOR
   Hypothetical change simulation
   ============================================ */

.prorank-seo-simulator {
  padding: var(--prorank-spacing-lg);
}

.prorank-simulator-progress-wrapper {
  margin-bottom: var(--prorank-spacing-xl);
}

.prorank-simulator-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
}

.prorank-simulator-steps::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--prorank-border);
  z-index: 0;
}

.prorank-simulator-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--prorank-spacing-sm);
  position: relative;
  z-index: 1;
}

.prorank-simulator-step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--prorank-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: var(--prorank-transition);
}

.prorank-simulator-step.is-active .prorank-simulator-step-circle {
  background: var(--prorank-primary);
  border-color: var(--prorank-primary);
  color: white;
  transform: scale(1.1);
}

.prorank-simulator-step.is-completed .prorank-simulator-step-circle {
  background: var(--prorank-success);
  border-color: var(--prorank-success);
  color: white;
}

.prorank-simulator-step-label {
  font-size: 0.875rem;
  color: var(--prorank-text-secondary);
  text-align: center;
  max-width: 100px;
}

.prorank-simulator-step.is-active .prorank-simulator-step-label {
  color: var(--prorank-primary);
  font-weight: 600;
}

.prorank-simulator-changes-editor {
  background: var(--prorank-bg-secondary);
  border: 1px solid var(--prorank-border);
  border-radius: var(--prorank-radius);
  padding: var(--prorank-spacing-lg);
}

.prorank-simulator-impact-chart {
  background: white;
  border: 1px solid var(--prorank-border);
  border-radius: var(--prorank-radius);
  padding: var(--prorank-spacing-lg);
  margin-top: var(--prorank-spacing-lg);
}

/* ============================================
   SEO ROADMAPS
   Task planning and kanban board
   ============================================ */

.prorank-roadmap-container {
  padding: var(--prorank-spacing-lg);
}

.prorank-roadmap-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--prorank-spacing-lg);
  margin-top: var(--prorank-spacing-lg);
}

.prorank-kanban-column {
  background: var(--prorank-bg-secondary);
  border-radius: var(--prorank-radius);
  padding: var(--prorank-spacing-md);
  min-height: 400px;
}

.prorank-kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--prorank-spacing-md);
  padding-bottom: var(--prorank-spacing-sm);
  border-bottom: 2px solid var(--prorank-border);
}

.prorank-kanban-column-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--prorank-text);
}

.prorank-kanban-column-count {
  background: var(--prorank-primary);
  color: white;
  padding: 2px 8px;
  border-radius: var(--prorank-radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.prorank-kanban-cards {
  display: flex;
  flex-direction: column;
  gap: var(--prorank-spacing-sm);
}

.prorank-task-card {
  background: white;
  border: 1px solid var(--prorank-border);
  border-radius: var(--prorank-radius);
  padding: var(--prorank-spacing-md);
  cursor: move;
  transition: var(--prorank-transition);
}

.prorank-task-card:hover {
  box-shadow: var(--prorank-shadow-md);
  transform: translateY(-2px);
}

.prorank-task-card.is-dragging {
  opacity: 0.5;
  transform: rotate(2deg);
}

.prorank-task-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--prorank-spacing-sm);
}

.prorank-task-card-priority {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: var(--prorank-radius-sm);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
}

.prorank-task-card-priority.is-high {
  background: var(--prorank-error-light);
  color: var(--prorank-error);
}

.prorank-task-card-priority.is-medium {
  background: var(--prorank-warning-light);
  color: var(--prorank-warning);
}

.prorank-task-card-priority.is-low {
  background: var(--prorank-success-light);
  color: var(--prorank-success);
}

.prorank-task-card-title {
  font-weight: 600;
  color: var(--prorank-text);
  margin-bottom: var(--prorank-spacing-xs);
}

.prorank-task-card-description {
  font-size: 0.875rem;
  color: var(--prorank-text-secondary);
  margin-bottom: var(--prorank-spacing-sm);
}

.prorank-task-card-meta {
  display: flex;
  align-items: center;
  gap: var(--prorank-spacing-md);
  font-size: 0.75rem;
  color: var(--prorank-text-muted);
}

.prorank-task-card-assignee {
  display: flex;
  align-items: center;
  gap: var(--prorank-spacing-xs);
}

.prorank-task-card-assignee-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--prorank-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--prorank-primary);
}

/* ============================================
   AUDIT LOG
   Activity tracking and history
   ============================================ */

.prorank-audit-log {
  padding: var(--prorank-spacing-lg);
}

.prorank-audit-filters {
  display: flex;
  gap: var(--prorank-spacing-md);
  margin-bottom: var(--prorank-spacing-lg);
  flex-wrap: wrap;
}

.prorank-audit-timeline {
  position: relative;
  padding-left: var(--prorank-spacing-xl);
}

.prorank-audit-timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--prorank-border);
}

.prorank-audit-entry {
  position: relative;
  margin-bottom: var(--prorank-spacing-lg);
}

.prorank-audit-entry-dot {
  position: absolute;
  left: -25px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--prorank-primary);
}

.prorank-audit-entry-content {
  background: white;
  border: 1px solid var(--prorank-border);
  border-radius: var(--prorank-radius);
  padding: var(--prorank-spacing-md);
}

.prorank-audit-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--prorank-spacing-sm);
}

.prorank-audit-entry-user {
  display: flex;
  align-items: center;
  gap: var(--prorank-spacing-sm);
  font-weight: 600;
}

.prorank-audit-entry-time {
  font-size: 0.875rem;
  color: var(--prorank-text-secondary);
}

.prorank-audit-entry-action {
  color: var(--prorank-text);
  margin-bottom: var(--prorank-spacing-xs);
}

.prorank-audit-entry-details {
  font-size: 0.875rem;
  color: var(--prorank-text-secondary);
  background: var(--prorank-bg-secondary);
  padding: var(--prorank-spacing-sm);
  border-radius: var(--prorank-radius-sm);
  margin-top: var(--prorank-spacing-sm);
}

/* ============================================
   ANIMATIONS
   Agency Hub specific animations
   ============================================ */

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

/* ============================================
   RESPONSIVE
   Mobile and tablet adjustments
   ============================================ */

@media (max-width: 768px) {
  .prorank-collaboration-container {
    grid-template-columns: 1fr;
  }
  
  .prorank-collaboration-sidebar {
    position: static;
  }
  
  .prorank-user-row {
    grid-template-columns: 1fr;
    gap: var(--prorank-spacing-sm);
  }
  
  .prorank-roadmap-board {
    grid-template-columns: 1fr;
  }
  
  .prorank-simulator-steps {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .prorank-simulator-steps::before {
    top: 0;
    bottom: 0;
    left: 20px;
    width: 2px;
    height: auto;
  }
}