/*
 * New Task Wizard CSS
 * 3-step wizard for creating tasks from dashboard
 * Matches glassmorphic design from design-system-v2.css
 */

/* ==========================================
   OVERLAY & BACKDROP
   ========================================== */

.ntw-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.ntw-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.ntw-container {
  position: relative;
  z-index: 1;
  background: var(--bg-card, #ffffff);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: ntwSlideUp 0.3s ease-out;
}

@keyframes ntwSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================
   HEADER
   ========================================== */

.ntw-header {
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  color: white;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ntw-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.ntw-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.ntw-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.ntw-close svg {
  width: 20px;
  height: 20px;
}

/* ==========================================
   PROGRESS INDICATOR
   ========================================== */

.ntw-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 32px;
  background: var(--surface-secondary, #f8fafc);
  border-bottom: 1px solid var(--border-light, #e2e8f0);
  gap: 0;
}

.ntw-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.ntw-progress-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-secondary, #f1f5f9);
  border: 2px solid var(--border-light, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary, #64748b);
  transition: all 0.3s ease;
}

.ntw-progress-circle svg {
  width: 18px;
  height: 18px;
}

.ntw-progress-step-active .ntw-progress-circle {
  background: #3B82F6;
  border-color: #3B82F6;
  color: white;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.ntw-progress-step-completed .ntw-progress-circle {
  background: #10B981;
  border-color: #10B981;
  color: white;
}

.ntw-progress-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ntw-progress-step-active .ntw-progress-label {
  color: #3B82F6;
  font-weight: 600;
}

.ntw-progress-step-completed .ntw-progress-label {
  color: #10B981;
}

.ntw-progress-line {
  width: 60px;
  height: 2px;
  background: var(--border-light, #e2e8f0);
  margin: 0 8px;
  margin-bottom: 28px;
}

.ntw-progress-step-completed + .ntw-progress-line {
  background: #10B981;
}

/* ==========================================
   STEP CONTENT
   ========================================== */

.ntw-step {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.ntw-step-header {
  margin-bottom: 20px;
}

.ntw-step-header h3 {
  margin: 0 0 6px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
}

.ntw-step-description {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary, #64748b);
}

/* ==========================================
   SEARCH INPUT
   ========================================== */

.ntw-search-container {
  position: relative;
  margin-bottom: 16px;
}

.ntw-search-container i,
.ntw-search-container svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-secondary, #64748b);
  pointer-events: none;
}

.ntw-search-input {
  width: 100%;
  padding: 12px 14px 12px 44px;
  font-size: 14px;
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 10px;
  background: white;
  transition: all 0.2s;
}

.ntw-search-input:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ntw-search-input::placeholder {
  color: var(--text-tertiary, #94a3b8);
}

/* ==========================================
   CLIENT LIST
   ========================================== */

.ntw-client-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  overflow-x: hidden;
}

.ntw-client-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: white;
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.ntw-client-item:hover {
  background: var(--bg-hover, #f8fafc);
  border-color: #3B82F6;
  box-shadow: 0 4px 12px -2px rgba(59, 130, 246, 0.15);
}

.ntw-client-logo {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-secondary, #f8fafc);
}

.ntw-client-logo-placeholder {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

.ntw-client-info {
  flex: 1;
  min-width: 0;
}

.ntw-client-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  margin-bottom: 4px;
}

.ntw-client-services {
  font-size: 13px;
  color: var(--text-secondary, #64748b);
}

.ntw-client-item svg {
  width: 18px;
  height: 18px;
  color: var(--text-tertiary, #94a3b8);
  flex-shrink: 0;
}

/* ==========================================
   SELECTED CLIENT DISPLAY
   ========================================== */

.ntw-selected-client {
  margin-bottom: 20px;
}

.ntw-selected-client-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(29, 78, 216, 0.1) 100%);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 10px;
}

.ntw-selected-client-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.ntw-selected-client-logo-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: white;
}

.ntw-selected-client-info {
  flex: 1;
}

.ntw-selected-client-label {
  font-size: 11px;
  font-weight: 500;
  color: #3B82F6;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.ntw-selected-client-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
}

/* ==========================================
   SERVICE GRID
   ========================================== */

.ntw-service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.ntw-service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 16px;
  background: white;
  border: 2px solid var(--border-light, #e2e8f0);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.ntw-service-card:hover {
  border-color: #3B82F6;
  background: rgba(59, 130, 246, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -5px rgba(59, 130, 246, 0.15);
}

.ntw-service-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(29, 78, 216, 0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3B82F6;
}

.ntw-service-icon svg {
  width: 26px;
  height: 26px;
}

.ntw-service-card:hover .ntw-service-icon {
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  color: white;
}

.ntw-service-card h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
}

.ntw-service-card p {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary, #64748b);
  line-height: 1.4;
}

/* ==========================================
   MODE SELECTION (Step 3)
   ========================================== */

.ntw-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ntw-mode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 20px;
  background: white;
  border: 2px solid var(--border-light, #e2e8f0);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.ntw-mode-card:hover {
  border-color: #3B82F6;
  background: rgba(59, 130, 246, 0.05);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px -8px rgba(59, 130, 246, 0.2);
}

.ntw-mode-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(29, 78, 216, 0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3B82F6;
}

.ntw-mode-icon svg {
  width: 32px;
  height: 32px;
}

.ntw-mode-card:hover .ntw-mode-icon {
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  color: white;
}

.ntw-mode-card h4 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
}

.ntw-mode-card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary, #64748b);
  line-height: 1.5;
}

/* ==========================================
   EMPTY STATE
   ========================================== */

.ntw-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  color: var(--text-secondary, #64748b);
}

.ntw-empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.ntw-empty-state p {
  margin: 0;
  font-size: 14px;
}

/* ==========================================
   FOOTER
   ========================================== */

.ntw-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--surface-secondary, #f8fafc);
  border-top: 1px solid var(--border-light, #e2e8f0);
}

.ntw-btn-secondary,
.ntw-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: transparent;
  color: var(--text-secondary, #64748b);
}

.ntw-btn-secondary {
  background: white;
  border: 1px solid var(--border-light, #e2e8f0);
  color: var(--text-primary, #1e293b);
}

.ntw-btn-secondary:hover,
.ntw-btn-ghost:hover {
  background: var(--bg-hover, #f1f5f9);
  color: var(--text-primary, #1e293b);
}

.ntw-btn-secondary svg,
.ntw-btn-ghost svg {
  width: 16px;
  height: 16px;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 640px) {
  .ntw-overlay {
    padding: 0;
  }

  .ntw-container {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .ntw-mode-grid {
    grid-template-columns: 1fr;
  }

  .ntw-progress {
    padding: 16px;
  }

  .ntw-progress-line {
    width: 40px;
  }
}
