/* Q1 2026 Priorities App - Styles */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --success: #16a34a;
  --warning: #ca8a04;
  --error: #dc2626;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-500);
  text-decoration: none;
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}

.back-link:hover {
  color: var(--primary);
}

/* Header */
header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

header p {
  color: var(--gray-500);
}

.header-team-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 0.5rem;
}

/* Progress Steps */
.progress-bar {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--gray-100);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--gray-500);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.progress-step:hover {
  background: var(--gray-200);
}

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

.progress-step.active {
  background: var(--primary);
  color: white;
}

.progress-step.active:hover {
  background: var(--primary-hover);
}

.progress-step.completed {
  background: var(--success);
  color: white;
}

.progress-step.completed:hover {
  background: #15803d;
}

/* Cards */
.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--gray-700);
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--gray-700);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-group .hint {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-top: 0.25rem;
}

.form-group .hint.hint-above {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

/* Team selection - scrollable list */
.existing-teams-section {
  margin-top: 0;
}

.team-filter-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 1rem;
}

.team-filter-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.team-list-container {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--gray-50);
}

.team-list {
  display: flex;
  flex-direction: column;
}

.team-list-item {
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--gray-200);
  cursor: pointer;
  font-size: 0.9375rem;
  text-align: left;
  transition: background 0.15s;
}

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

.team-list-item:hover {
  background: var(--gray-100);
}

.team-list-item.selected {
  background: var(--primary);
  color: white;
}

.team-list-item.selected:hover {
  background: var(--primary-hover);
}

.team-list-empty {
  padding: 1rem;
  text-align: center;
  color: var(--gray-500);
  font-style: italic;
}

.divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: var(--gray-400);
  font-size: 0.875rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.divider span {
  padding: 0 1rem;
}

/* Team input with dropdown */
.team-input-wrapper {
  position: relative;
}

.team-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--gray-300);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

.team-dropdown-item {
  padding: 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-100);
}

.team-dropdown-item:hover {
  background: var(--gray-50);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-primary:disabled {
  background: var(--gray-300);
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
}

.btn-secondary:hover {
  background: var(--gray-200);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #15803d;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
}

.btn-outline:hover {
  background: var(--gray-50);
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-block {
  width: 100%;
}

/* Button groups */
.btn-group {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn-group-right {
  justify-content: flex-end;
}

/* Workflow Selection */
.workflow-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.workflow-option {
  padding: 1.5rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.workflow-option:hover {
  border-color: var(--primary);
}

.workflow-option.selected {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.05);
}

.workflow-option h3 {
  margin-bottom: 0.5rem;
}

.workflow-option p {
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* Priority Counter */
.priority-counter {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  margin: 1rem 0;
}

.priority-counter button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--gray-300);
  background: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.priority-counter button:hover {
  background: var(--gray-50);
}

.priority-counter button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.priority-counter span {
  font-size: 1.5rem;
  font-weight: 600;
  min-width: 2rem;
  text-align: center;
}

/* Side by side comparison */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.comparison-side {
  padding: 1rem;
  border-radius: var(--radius);
}

.comparison-original {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
}

.comparison-suggested {
  background: rgba(37, 99, 235, 0.05);
  border: 1px solid var(--primary);
}

.comparison-side h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
}

.comparison-side p {
  font-size: 0.9375rem;
}

.feedback {
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--gray-600);
}

.feedback strong {
  color: var(--gray-700);
}

/* Priority list in review */
.priority-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.priority-item {
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
}

.priority-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.priority-number {
  font-weight: 600;
  color: var(--primary);
}

.priority-item h4 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.priority-item p {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.priority-item .dod {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--gray-200);
}

.priority-item .dod-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-500);
  margin-bottom: 0.25rem;
}

/* Success page */
.success-container {
  text-align: center;
  padding: 2rem;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
}

.success-container h2 {
  margin-bottom: 0.5rem;
}

.success-container p {
  color: var(--gray-500);
  margin-bottom: 1.5rem;
}

.success-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Share link */
.share-link {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}

.share-link input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.875rem;
  background: var(--gray-50);
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.loading-content {
  text-align: center;
}

.loading-content p {
  margin-top: 1rem;
  color: var(--gray-600);
}

/* Alert messages */
.alert {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--error);
}

.alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: var(--success);
}

/* Hide/show sections */
.hidden {
  display: none !important;
}

/* Print styles */
@media print {
  body {
    background: white;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .btn,
  .progress-bar,
  .share-link,
  .success-actions {
    display: none !important;
  }

  .card {
    box-shadow: none;
    border: 1px solid var(--gray-200);
    break-inside: avoid;
  }

  .priority-item {
    break-inside: avoid;
  }
}

/* Four Helpful Lists Styles */
.list-header {
  margin-bottom: 1.5rem;
}

.list-header h2 {
  margin-bottom: 0.25rem;
}

.list-description {
  color: var(--gray-500);
  font-size: 0.9375rem;
}

.list-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  min-height: 2rem;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
}

.list-item-text {
  flex: 1;
}

.list-item-remove {
  background: none;
  border: none;
  color: var(--gray-400);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 0.5rem;
  line-height: 1;
}

.list-item-remove:hover {
  color: var(--error);
}

.add-item-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.add-item-input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 1rem;
}

.add-item-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.item-count {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 1rem;
}

/* Review Lists */
.review-lists {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.review-list-section {
  padding: 1rem;
  background: var(--gray-50);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
}

.review-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  cursor: pointer;
  color: var(--gray-700);
}

.review-list-header:hover {
  color: var(--primary);
}

.review-list-count {
  font-weight: normal;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.review-list-items {
  margin: 0;
  padding-left: 1.25rem;
}

.review-list-items li {
  margin-bottom: 0.25rem;
  color: var(--gray-600);
}

.review-list-items li:last-child {
  margin-bottom: 0;
}

.review-list-empty {
  color: var(--gray-400);
  font-style: italic;
  margin: 0;
}

/* Responsive */
@media (max-width: 640px) {
  .container {
    padding: 1rem;
  }

  .workflow-options {
    grid-template-columns: 1fr;
  }

  .comparison {
    grid-template-columns: 1fr;
  }

  .btn-group {
    flex-direction: column;
  }

  .progress-bar {
    flex-wrap: wrap;
  }
}
