/*
 * Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
 * See LICENSE in the project root for license information.
 */

/* CSS Variables for Light and Dark Mode */
:root {
  /* Light Mode Colors (Default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f5f5f5;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-inverse: #ffffff;
  --border-color: #e1e5e9;
  --border-light: #ddd;
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-hover: rgba(0, 0, 0, 0.15);

  /* Component Colors */
  --input-bg: #ffffff;
  --input-border: #e1e5e9;
  --card-bg: #ffffff;
  --header-bg: #f5f5f5;
}

/* Dark Mode Colors */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #1e1e1e;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #3a3a3a;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-inverse: #1e1e1e;
    --border-color: #404040;
    --border-light: #505050;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.5);

    --input-bg: #2d2d2d;
    --input-border: #404040;
    --card-bg: #2d2d2d;
    --header-bg: #252525;
  }
}

 html,
 body {
     width: 100%;
     height: 100%;
     margin: 0;
     padding: 0;
     background-color: var(--bg-primary);
     color: var(--text-primary);
     transition: background-color 0.3s ease, color 0.3s ease;
 }

/* Consent UI Styles */
.consent-modal {
  background: var(--card-bg);
  border: 2px solid #2196F3;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  box-shadow: 0 4px 12px var(--shadow);
}

.consent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #2196F3;
}

.consent-header h3 {
  margin: 0;
  color: #2196F3;
  font-size: 16px;
}

.consent-counter {
  background: #2196F3;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.consent-body {
  margin-bottom: 16px;
}

.edit-severity {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 12px;
}

.severity-high {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef5350;
}

.severity-medium {
  background: #fff3e0;
  color: #f57c00;
  border: 1px solid #ffb74d;
}

.severity-low {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #66bb6a;
}

.edit-reason {
  margin-bottom: 16px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
}

.edit-diff {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.diff-section {
  flex: 1;
}

.diff-label {
  font-weight: 600;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.diff-text {
  padding: 12px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.6;
  min-height: 60px;
  max-height: 150px;
  overflow-y: auto;
}

.original-text {
  background: #ffebee;
  border: 1px solid #ef5350;
  color: #c62828;
}

.proposed-text {
  background: #e8f5e9;
  border: 1px solid #66bb6a;
  color: #2e7d32;
}

.diff-arrow {
  font-size: 20px;
  color: #2196F3;
  font-weight: bold;
}

.edit-metadata {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.consent-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.consent-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.approve-btn {
  background: #4CAF50;
  color: white;
}

.approve-btn:hover {
  background: #45a049;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.reject-btn {
  background: #f44336;
  color: white;
}

.reject-btn:hover {
  background: #da190b;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.consent-batch-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.batch-btn {
  background: #9E9E9E;
  color: white;
  font-size: 12px;
  padding: 8px;
}

.batch-btn:hover {
  background: #757575;
}

.consent-stats {
  text-align: center;
  font-size: 11px;
  color: var(--text-secondary);
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}
 
 ul {
     margin: 0;
     padding: 0;
 }
 
 .ms-welcome__header {
    padding: 20px;
    padding-bottom: 10px;
    padding-top: 30px;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    align-items: center;
 }

 .ms-welcome__main {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-flex-wrap: nowrap;
    flex-wrap: nowrap;
    -webkit-align-items: center;
    align-items: center;
    -webkit-flex: 1 0 0;
    flex: 1 0 0;
    padding: 10px 20px;
 }
 
 .ms-welcome__main > h2 {
     width: 100%;
     text-align: center;
 }
 
 .ms-welcome__features {
     list-style-type: none;
     margin-top: 20px;
 }
 
 .ms-welcome__features.ms-List .ms-ListItem {
     padding-bottom: 20px;
     display: -webkit-flex;
     display: flex;
 }
 
 .ms-welcome__features.ms-List .ms-ListItem > .ms-Icon {
     margin-right: 10px;
 }
 
 .ms-welcome__action.ms-Button--hero {
     margin-top: 30px;
 }
 
.modern-btn {
  padding: 15px 30px;
  font-size: 18px;
  font-weight: 600;
  color: black;           /* black text */
  border: none;
  border-radius: 10px;
  cursor: pointer;
  outline: none;          /* removes browser outline */
  background: linear-gradient(135deg, #f97316, #fb923c, #facc15);
  /* red → orange → yellow */
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
}

/* Hover state */
.modern-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}

/* Active (clicked) state */
.modern-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}


b {
    font-weight: bold;
}
/* 
#run {
    min-height: 48px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    border: 1px solid #8a8886;
    background-color: #0078d4;
    color: white;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.1s ease;
} */

#run:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.15);
    background-color: #106ebe;
}

.input-container {
    margin-bottom: 15px;
}

.input-container label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.input-container input {
    width: 100%;           /* adjust so it doesn't span edge-to-edge */
    max-width: 400px;     /* keeps it tidy on large screens */
    padding: 10px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    font-size: 16px;      /* ⬅️ bigger text */
    line-height: 1.4;     /* ⬅️ improves readability */
    background: var(--input-bg);
    color: var(--text-primary);
}

/* Common wrapper to align input + button */
.action-section {
  display: flex;
  flex-direction: column;
  align-items: center; /* centers them horizontally */
  gap: 12px;           /* controls spacing between input & button */
}

/* Make input match button width */
.input-container input,
.modern-btn {
  width: 230px;       /* pick one width for both */
  max-width: 100%;    /* keep responsive */
}

.input-container textarea {
    width: 100%;
    max-width: 400px;
    min-height: 100px;     /* allows multiple lines */
    padding: 12px 14px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.4;
    resize: vertical;      /* lets user drag to resize height */
    box-sizing: border-box;
    background: var(--input-bg);
    color: var(--text-primary);
}

/* Task List Styles */
.task-list-container {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    box-shadow: 0 2px 8px var(--shadow);
}

.task-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.task-list-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;

    /* Ellipsis for long titles */
    overflow: hidden;
}

.task-list-stats {
    display: flex;
    gap: 12px;
    font-size: 13px;
}

.stat-item {
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.stat-completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.task-list-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 6px;
    background: transparent;
    transition: all 0.2s;
}

.task-item.task-pending {
    background: transparent;
    border-left: 3px solid #ddd;
}

.task-item.task-in_progress {
    background: transparent;
    border-left: 3px solid #42A5F5;
    font-weight: 500;
}

.task-item.task-completed {
    background: transparent;
    border-left: 3px solid #ddd;
    opacity: 0.8;
}

.task-item.task-failed {
    background: transparent;
    border-left: 3px solid #EF5350;
}

.task-checkbox {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: not-allowed;
    accent-color: #66BB6A;
    margin: 0;
}

/* Force checkbox to stay green even when disabled and checked */
.task-checkbox:disabled:checked {
    accent-color: #66BB6A !important;
    opacity: 1 !important;
    filter: saturate(1) brightness(1) !important;
}

/* Prevent browser from greying out disabled checkboxes */
.task-checkbox:disabled {
    opacity: 1 !important;
    filter: none !important;
}

.task-spinner {
    font-size: 16px;
    flex-shrink: 0;
    margin-left: 8px;
    color: #42A5F5;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

.task-text {
    flex: 1;
    font-size: 14px;
    color: #333;  /* Dark text for readability on light backgrounds */
    line-height: 1.4;
    margin-left: 10px;

    /* Text wrapping for long content */
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 0;  /* Required for proper wrapping in flexbox */
}

.task-duration {
    font-size: 11px;
    color: var(--text-secondary);
    background: var(--bg-primary);
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 500;
}

.task-list-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.task-empty-message {
    font-size: 14px;
    margin: 0;
}

/* Task Accordion Styles */
.task-list-accordion {
    width: 100%;
    min-width: 280px;
    margin: 16px 0 0 0;
    box-sizing: border-box;
}

.task-list-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
    min-width: 280px;
    box-sizing: border-box;
}

.task-list-accordion-header:hover {
    background-color: #f8f9fa;
}

.task-list-accordion-header.active {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: none;
}

.task-accordion-icon {
    transition: transform 0.3s;
    color: #666;
    font-size: 18px;
    user-select: none;
}

.task-accordion-icon.active {
    transform: rotate(180deg);
}

.task-list-accordion-content {
    display: none;
    border: 2px solid #ddd;
    border-top: none;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    background: white;
}

.task-list-accordion-content.active {
    display: block;
}

.task-list-accordion-content .task-list-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}