/* Monitor Form Wizard Styles */

.monitor-form-wizard {
  --wizard-primary-color: var(--tblr-primary);
  --wizard-success-color: var(--tblr-success);
  --wizard-border-color: var(--tblr-border-color-light);
}

/* Step Progress Enhancements - completed styles removed for cleaner UX */

/* Preview Card Sticky Positioning */
.monitor-preview-card {
  position: sticky;
  top: 1rem;
}

.preview-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--wizard-border-color);
}

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

.preview-item .preview-label {
  font-weight: 500;
  color: var(--tblr-body-color);
  flex-shrink: 0;
  margin-right: 1rem;
}

.preview-item .preview-value {
  color: var(--tblr-secondary);
  text-align: right;
  word-break: break-word;
}

/* Agent Selection Grid */
.agent-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.agent-card {
  border: 2px solid var(--tblr-border-color);
  border-radius: 0.5rem;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--tblr-card-bg);
}

.agent-card:hover {
  border-color: var(--wizard-primary-color);
  box-shadow: 0 4px 6px -1px rgba(var(--tblr-body-color-rgb), 0.1);
}

.agent-card.selected {
  border-color: var(--wizard-primary-color);
  background: var(--tblr-primary-lt);
}

.agent-card.unavailable {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: var(--tblr-border-color-light);
}

.agent-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.agent-location {
  font-size: 0.875rem;
  color: var(--tblr-muted);
  margin-bottom: 0.5rem;
}

.agent-status {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.agent-status.available {
  background: var(--tblr-green-lt);
  color: var(--tblr-green-fg);
}

.agent-status.unavailable {
  background: var(--tblr-red-lt);
  color: var(--tblr-red-fg);
}

/* Form Navigation */
.form-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--tblr-border-color);
}

/* Test Result Cards */
.test-result-card {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--tblr-border-color);
  border-radius: 0.5rem;
  background: var(--tblr-bg-surface-secondary);
}

.test-result-success {
  border-color: var(--tblr-green);
  background: var(--tblr-green-lt);
}

.test-result-error {
  border-color: var(--tblr-red);
  background: var(--tblr-red-lt);
}

/* Enhanced error field styling */
.form-control.is-invalid {
  border-color: var(--tblr-red);
  box-shadow: 0 0 0 0.2rem var(--tblr-red-lt);
}

.invalid-feedback.d-block {
  display: block !important;
  font-weight: 500;
  margin-top: 0.5rem;
}

/* Shake animation for validation errors */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.shake {
  animation: shake 0.5s ease-in-out;
}

/* Card Hoverable Effect */
.card-hoverable {
  transition: all 0.2s ease;
}

.card-hoverable:hover {
  box-shadow: 0 4px 12px rgba(var(--tblr-body-color-rgb), 0.1);
  transform: translateY(-2px);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .agent-selection-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .monitor-preview-card {
    position: static;
    margin-top: 1rem;
  }

  .preview-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .preview-item .preview-value {
    text-align: left;
    margin-top: 0.25rem;
  }

  .form-navigation {
    flex-direction: column;
    gap: 1rem;
  }

  .form-navigation > div {
    width: 100%;
    display: flex;
    gap: 0.5rem;
  }

  .form-navigation .btn {
    flex: 1;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .agent-card {
    background: var(--tblr-card-bg);
    border-color: var(--tblr-border-color);
  }

  .agent-card:hover {
    border-color: var(--wizard-primary-color);
  }

  .test-result-card {
    background: var(--tblr-card-bg);
    border-color: var(--tblr-border-color);
  }
}
