/* Custom styles for Task Tracker with Bootstrap 5.3.8 */

/* Task status background colors */
.task-status-new {
  background-color: #ffffff !important;
}

.task-status-in_progress {
  background-color: #fef3c7 !important;
}

.task-status-done {
  background-color: #d1fae5 !important;
}

.task-status-cancelled {
  background-color: #fee2e2 !important;
}

.task-status-research {
  background-color: #dbeafe !important;
}

/* Highlighted note */
.highlighted-note {
  background-color: #fef3c7 !important;
}

/* QR Code container for 2FA */
.qr-code-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  max-width: 200px;
  margin: 0 auto;
}

/* Recovery codes styling */
.recovery-codes-container {
  margin: 1rem 0;
}

.recovery-codes-list code {
  font-family: 'Courier New', monospace;
  letter-spacing: 0.1em;
}

/* Markdown content styles */
.markdown-content {
  line-height: 1.6;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: 600;
}

.markdown-content h1 {
  font-size: 2em;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0.3em;
}

.markdown-content h2 {
  font-size: 1.5em;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.3em;
}

.markdown-content h3 {
  font-size: 1.25em;
}

.markdown-content p {
  margin-bottom: 1em;
}

.markdown-content ul,
.markdown-content ol {
  padding-left: 2em;
  margin-bottom: 1em;
}

.markdown-content li {
  margin-bottom: 0.5em;
}

.markdown-content pre {
  background-color: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 1em;
  overflow-x: auto;
  margin-bottom: 1em;
}

.markdown-content code {
  background-color: #f3f4f6;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.markdown-content pre code {
  background: none;
  padding: 0;
}

.markdown-content blockquote {
  border-left: 4px solid #3b82f6;
  padding-left: 1em;
  color: #6b7280;
  margin: 1em 0;
}

.markdown-content a {
  color: #3b82f6;
  text-decoration: none;
}

.markdown-content a:hover {
  text-decoration: underline;
}

.markdown-content table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1em;
}

.markdown-content table th,
.markdown-content table td {
  border: 1px solid #e5e7eb;
  padding: 0.5em;
  text-align: left;
}

.markdown-content table th {
  background-color: #f3f4f6;
  font-weight: 600;
}

.markdown-content hr {
  border: none;
  border-top: 2px solid #e5e7eb;
  margin: 2em 0;
}

.markdown-content img {
  max-width: 100%;
  height: auto;
}

/* Markdown hint text */
.markdown-hint {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Toggle controls (hidden checkboxes for pure CSS toggling) */
.comment-toggle,
.disable-2fa-toggle {
  display: none;
}

.comment-toggle-btn {
  cursor: pointer;
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.25rem 0.5rem;
  background-color: #3b82f6;
  color: white;
  border-radius: 4px;
  font-size: 0.875rem;
}

.comment-toggle-btn::before {
  content: '+ Add comment';
}

.comment-toggle:checked ~ .comment-toggle-btn::before {
  content: '− Hide form';
}

.comment-form {
  display: none;
  margin-top: 1rem;
}

.comment-toggle:checked ~ .comment-form {
  display: block;
}

/* Comment list styles */
.comments-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
}

.comment-item {
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 0;
}

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

.comment-header {
  background-color: #e8f4fc;
  padding: 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.comment-time {
  font-size: 0.875rem;
}

.comment-edit-btn,
.comment-delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
  font-size: 1rem;
  padding: 0 0.25rem;
  margin-left: 0.5rem;
}

.comment-edit-btn:hover,
.comment-delete-btn:hover {
  color: #3b82f6;
}

.comment-text {
  padding: 0.5rem;
}

.comment-deleted {
  font-style: italic;
  padding: 0.5rem;
}

/* Task details table */
.task-details {
  width: 100%;
  border-collapse: collapse;
}

.task-details td {
  padding: 0.75rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.task-details tr:last-child td {
  border-bottom: none;
}

.task-details td:first-child {
  width: 140px;
  color: #6b7280;
  font-weight: 400;
}

.task-details td:last-child {
  font-weight: 600;
}

/* 2FA disable form toggle */
.disable-2fa-form {
  display: none;
}

.disable-2fa-toggle:checked ~ .disable-2fa-form {
  display: block;
}

/* Header adaptive styles */
.header-select-project {
  min-width: 80px;
  max-width: 250px;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-username {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 30px;
  max-width: 150px;
  flex: 0 1 auto;
}
