/* Instructions Modal CSS - ReconcileIQ
 * Contains styling for the user instructions modal
 */

.instructions.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
  pointer-events: none;
}

.instructions.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.instructions.modal-container {
  background-color: var(--bg-card, #ffffff);
  border-radius: var(--radius-xl, 12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  width: 90%;
  max-width: 900px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.3s ease-in-out;
}

.instructions.modal-overlay.active .instructions.modal-container {
  transform: translateY(0);
}

.instructions.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light, #e5e7eb);
  background-color: var(--bg-subtle, #f9fafb);
}

.instructions.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary, #111827);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.instructions.modal-title svg {
  width: 24px;
  height: 24px;
  color: var(--color-primary, #3b82f6);
}

.instructions.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary, #6b7280);
  padding: 0.5rem;
  margin: -0.5rem;
  border-radius: var(--radius-md, 6px);
  transition: background-color 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.instructions.modal-close:hover {
  background-color: var(--bg-hover, #f3f4f6);
  color: var(--text-primary, #111827);
}

.instructions.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.instructions.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light, #e5e7eb);
  background-color: var(--bg-subtle, #f9fafb);
}

/* Navigation tabs for multi-step instructions */
.instructions.tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light, #e5e7eb);
  overflow-x: auto;
  padding-bottom: 1px;
}

.instructions.tab-button {
  padding: 0.75rem 1rem;
  border: none;
  background: none;
  color: var(--text-secondary, #6b7280);
  font-weight: 500;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: color 0.2s;
}

.instructions.tab-button:hover {
  color: var(--text-primary, #111827);
}

.instructions.tab-button.active {
  color: var(--color-primary, #3b82f6);
}

.instructions.tab-button.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-primary, #3b82f6);
  border-radius: 2px 2px 0 0;
}

.instructions.content-section {
  display: none;
}

.instructions.content-section.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Styled content elements */
.instructions.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary, #111827);
  margin: 1.5rem 0 0.75rem;
}

.instructions.section-title:first-child {
  margin-top: 0;
}

.instructions.content-box {
  background-color: var(--bg-subtle, #f9fafb);
  border-radius: var(--radius-lg, 8px);
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-light, #e5e7eb);
}

.instructions.highlight-box {
  background-color: rgba(59, 130, 246, 0.1);
  border-left: 3px solid var(--color-primary, #3b82f6);
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0 var(--radius-md, 6px) var(--radius-md, 6px) 0;
}

.instructions.step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.instructions.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--color-primary, #3b82f6);
  color: white;
  font-weight: bold;
  flex-shrink: 0;
}

.instructions.step-content {
  flex: 1;
}

.instructions.step-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.instructions.image-placeholder {
  background-color: var(--bg-subtle, #f9fafb);
  border: 1px dashed var(--border-medium, #d1d5db);
  border-radius: var(--radius-md, 6px);
  padding: 1.5rem;
  margin: 1rem 0;
  text-align: center;
  color: var(--text-secondary, #6b7280);
}

.instructions.card-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.instructions.card {
  border: 1px solid var(--border-light, #e5e7eb);
  border-radius: var(--radius-lg, 8px);
  padding: 1rem;
  background-color: var(--bg-card, #ffffff);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s, transform 0.2s;
}

.instructions.card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.instructions.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.instructions.card-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary, #3b82f6);
}

.instructions.card-title {
  font-weight: 600;
  color: var(--text-primary, #111827);
  margin: 0;
}

/* Tooltip styling */
.instructions.tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.instructions.tooltip-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary, #6b7280);
  background-color: var(--bg-subtle, #f9fafb);
  border-radius: 50%;
  margin-left: 0.25rem;
  transition: color 0.2s, background-color 0.2s;
}

.instructions.tooltip:hover .instructions.tooltip-icon {
  color: var(--color-primary, #3b82f6);
  background-color: rgba(59, 130, 246, 0.1);
}

.instructions.tooltip-content {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  max-width: 300px;
  background-color: var(--bg-tooltip, #27272a);
  color: white;
  text-align: center;
  border-radius: var(--radius-md, 6px);
  padding: 0.5rem 0.75rem;
  z-index: 1;
  font-size: 0.85rem;
  font-weight: normal;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  pointer-events: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  margin-bottom: 8px;
}

.instructions.tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: var(--bg-tooltip, #27272a) transparent transparent transparent;
}

.instructions.tooltip:hover .instructions.tooltip-content {
  opacity: 1;
  visibility: visible;
}

/* Progress indicator */
.instructions.progress-bar {
  height: 4px;
  background-color: var(--border-light, #e5e7eb);
  border-radius: 2px;
  overflow: hidden;
  margin: 1rem 0;
}

.instructions.progress-value {
  height: 100%;
  background-color: var(--color-primary, #3b82f6);
  border-radius: 2px;
  transition: width 0.3s ease-in-out;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .instructions.modal-container {
    width: 95%;
    max-height: 90vh;
  }
  
  .instructions.card-group {
    grid-template-columns: 1fr;
  }
  
  .instructions.tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    padding: 0 1.5rem 1px 1.5rem;
    scroll-padding: 1.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .instructions.tabs::-webkit-scrollbar {
    display: none;
  }
  
  .instructions.step {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .instructions.step-number {
    margin-bottom: 0.25rem;
  }
}

/* Dark mode support
@media (prefers-color-scheme: dark) {
  .instructions.modal-container {
    background-color: var(--bg-card-dark, #1f2937);
  }
  
  .instructions.modal-header,
  .instructions.modal-footer {
    background-color: var(--bg-subtle-dark, #111827);
    border-color: var(--border-light-dark, #374151);
  }
  
  .instructions.modal-title {
    color: var(--text-primary-dark, #f9fafb);
  }
  
  .instructions.modal-close {
    color: var(--text-secondary-dark, #9ca3af);
  }
  
  .instructions.modal-close:hover {
    background-color: var(--bg-hover-dark, #374151);
    color: var(--text-primary-dark, #f9fafb);
  }
  
  .instructions.content-box {
    background-color: var(--bg-subtle-dark, #111827);
    border-color: var(--border-light-dark, #374151);
  }
  
  .instructions.image-placeholder {
    background-color: var(--bg-subtle-dark, #111827);
    border-color: var(--border-medium-dark, #4b5563);
    color: var(--text-secondary-dark, #9ca3af);
  }
  
  .instructions.card {
    background-color: var(--bg-card-dark, #1f2937);
    border-color: var(--border-light-dark, #374151);
  }
  
  .instructions.card-title {
    color: var(--text-primary-dark, #f9fafb);
  }
  
  .instructions.progress-bar {
    background-color: var(--border-light-dark, #374151);
  }
} */