/**
 * ============================================
 * Dashboard UX Components
 * Toast, Drag & Drop, Tiles, Quick Launch, etc.
 * Konsolidiert aus md-ux-styles.blade.php
 * ============================================
 */

/* === NAV TABS SCROLL (Mobile) === */
.nav-tabs-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-tabs-scroll .nav-tabs .nav-link {
  white-space: nowrap;
}

/* === TOAST NOTIFICATIONS === */
.md-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  animation: mdToastIn 0.25s ease-out;
  max-width: min(420px, calc(100vw - 40px));
  font-weight: 600;
}

/* Bootstrap toast containers used by protocol editors/runs */
#toastContainer {
  z-index: 1100;
}

/* Legacy toast fallback used by theme-manager.js (prefer mdUX.showToast) */
.md-legacy-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1100;
  min-width: 300px;
  max-width: min(420px, calc(100vw - 40px));
}

.md-legacy-toast-container .md-legacy-toast {
  margin-bottom: 8px;
  cursor: pointer;
}

.md-toast--success {
  background: var(--md-success, #27ae60);
}

.md-toast--error {
  background: var(--md-danger, #e74c3c);
}

.md-toast--info {
  background: var(--md-primary, #2d7ff9);
}

.md-toast__msg {
  line-height: 1.2;
}

@keyframes mdToastIn {
  from {
    transform: translateX(16px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* === DRAG & DROP (ROOMS) === */
.md-drop-zone.drag-over {
  background: #e3f2fd !important;
  border: 2px dashed #2196f3 !important;
  border-radius: 8px;
  min-height: 80px;
  position: relative;
}

.md-drop-zone.drag-over::after {
  content: 'Hier ablegen um System zu verschieben';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(33, 150, 243, 0.92);
  color: white;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
  white-space: nowrap;
  z-index: 10;
}

.md-system-item {
  cursor: grab;
}

.md-system-item:active {
  cursor: grabbing;
}

.md-system-item.dragging {
  opacity: 0.45;
}

/* === STICKY TABLE HEADER + FILTER ROW === */
.md-table-sticky thead th {
  position: sticky;
  top: var(--md-fixed-header-height, 110px);
  z-index: 6;
  background: var(--md-white, #fff);
  border-bottom: 1px solid var(--md-border, #e4e9f0);
}

.md-table-sticky thead tr.md-table-filter th {
  top: calc(var(--md-fixed-header-height, 110px) + var(--md-table-sticky-header-offset, 38px));
  z-index: 5;
  background: var(--md-gray-50, #f8fafb);
  border-bottom: 1px solid var(--md-border, #e4e9f0);
}

.md-table-filter .form-control {
  height: 30px;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 8px;
}

.md-content-flush {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* === SYSTEM TILES (CARDS GRID) === */
.md-system-tiles-toolbar {
  position: sticky;
  top: var(--md-fixed-header-height, 110px);
  z-index: 7;
  background: var(--md-white, #fff);
  border: 1px solid var(--md-border, #e4e9f0);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 12px;
}

.md-system-tiles-grid {
  display: grid;
  /* Keep tiles narrow even if only 1–2 items exist (avoid “giant cards”). */
  grid-template-columns: repeat(auto-fill, minmax(220px, 260px));
  justify-content: start;
  align-content: start;
  gap: 8px;
}

.md-system-tile {
  background: var(--md-white, #fff);
  border: 1px solid var(--md-border, #e4e9f0);
  border-radius: 12px;
  padding: 8px;
  transition:
    box-shadow 0.15s ease,
    transform 0.15s ease;
  min-height: 0;
  overflow: hidden;
}

.md-system-tile:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.md-system-tile__media {
  margin: -8px -8px 8px -8px;
  /* Square, centered tile media (image/placeholder) */
  /* Account for the full-bleed negative margins so the visible area is truly square */
  width: calc(100% + 16px);
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.md-system-tile__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: var(--md-gray-50, #f8fafb);
  border-bottom: 1px solid var(--md-border, #e4e9f0);
}

.md-system-tile__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(15, 120, 165, 0.18), rgba(15, 120, 165, 0.08));
}

.md-system-tile__logo {
  height: 28px;
  width: auto;
  max-width: 70%;
  object-fit: contain;
  opacity: 1;
  filter: none;
}

.md-system-tile__logo--dark {
  display: none;
}

/* Dark mode logo swap (ThemeManager sets [data-theme="dark"] on <html>) */
[data-theme='dark'] .md-system-tile__logo--light {
  display: none;
}
[data-theme='dark'] .md-system-tile__logo--dark {
  display: block;
}

.md-system-tile__title {
  font-weight: 800;
  color: var(--md-text, #2c3e50);
  text-decoration: none;
  display: inline-block;
  font-size: 13px;
  line-height: 1.15;
}

.md-system-tile__title:hover {
  color: var(--md-blue, #0f78a5);
}

.md-system-tile__meta {
  color: var(--md-gray-700, #44566c);
  font-size: 11px;
  margin-top: 3px;
}

.md-system-tile__row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
}

.md-system-tile__actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.md-system-tile__actions .btn {
  padding: 4px 8px;
  line-height: 1;
}

.md-system-tile__actions .btn i {
  margin: 0;
}

.md-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--md-gray-100, #f1f4f8);
  border: 1px solid var(--md-gray-200, #e4e9f0);
  color: var(--md-text, #2c3e50);
  white-space: nowrap;
}

.md-pill--danger {
  background: rgba(231, 76, 60, 0.08);
  border-color: rgba(231, 76, 60, 0.22);
  color: var(--md-danger, #e74c3c);
}

.md-pill--warning {
  background: rgba(243, 156, 18, 0.1);
  border-color: rgba(243, 156, 18, 0.24);
  color: var(--md-warning, #f39c12);
}

.md-pill--primary {
  background: rgba(15, 120, 165, 0.1);
  border-color: rgba(15, 120, 165, 0.22);
  color: var(--md-blue, #0f78a5);
}

.md-pill--info {
  background: rgba(45, 127, 249, 0.1);
  border-color: rgba(45, 127, 249, 0.22);
  color: var(--md-primary, #2d7ff9);
}

.md-pill--success {
  background: rgba(39, 174, 96, 0.1);
  border-color: rgba(39, 174, 96, 0.22);
  color: var(--md-success, #27ae60);
}

.md-pill--secondary {
  background: rgba(108, 117, 125, 0.1);
  border-color: rgba(108, 117, 125, 0.22);
  color: var(--md-text-light, #6b7c93);
}

/* Focus ring helper (used for deep-linking into upload dropzones) */
.md-focus-ring {
  outline: 3px solid rgba(45, 127, 249, 0.55);
  outline-offset: 4px;
  border-radius: 12px;
  animation: mdFocusPulse 1.1s ease-out 1;
}

@keyframes mdFocusPulse {
  0% {
    outline-color: rgba(45, 127, 249, 0);
  }
  40% {
    outline-color: rgba(45, 127, 249, 0.55);
  }
  100% {
    outline-color: rgba(45, 127, 249, 0);
  }
}

/* Responsive behavior is handled by the auto-fit grid + mobile overrides (mobile-responsive.css). */

/* === QUICK LAUNCH (FLOATING) === */
.md-quick-launch {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
}

.md-quick-launch__trigger {
  background: linear-gradient(
    135deg,
    var(--md-primary, #2d7ff9) 0%,
    var(--md-accent, #764ba2) 100%
  );
  color: #fff;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px 0 0 10px;
  cursor: pointer;
  font-size: 18px;
  border: 0;
  box-shadow: -2px 2px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

.md-quick-launch__trigger:hover {
  width: 58px;
}

.md-quick-launch__menu {
  position: absolute;
  right: 50px;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.md-quick-launch:hover .md-quick-launch__menu {
  opacity: 1;
  visibility: visible;
  right: 56px;
}

.md-quick-launch__item {
  background: #fff;
  color: var(--md-primary, #2d7ff9);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  text-decoration: none;
  position: relative;
}

.md-quick-launch__item:hover {
  background: linear-gradient(
    135deg,
    var(--md-primary, #2d7ff9) 0%,
    var(--md-accent, #764ba2) 100%
  );
  color: #fff;
  transform: translateX(-5px);
}

.md-quick-launch__item::before {
  content: attr(data-tooltip);
  position: absolute;
  right: 60px;
  background: #2c3e50;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
  font-weight: 700;
}

.md-quick-launch__item:hover::before {
  opacity: 1;
  visibility: visible;
  right: 66px;
}

@media (max-width: 768px) {
  .md-quick-launch {
    bottom: 16px;
    top: auto;
    transform: none;
  }

  .md-quick-launch__menu {
    flex-direction: row;
    bottom: 60px;
    right: 0;
    top: auto;
  }

  .md-quick-launch:hover .md-quick-launch__menu {
    bottom: 66px;
    right: 0;
  }

  .md-quick-launch__item::before {
    display: none;
  }
}

/* ============================================
   DEV COMMENT WIDGET
   ============================================ */
.dev-comment-widget {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1050;
}
.dev-comment-widget.dev-comment-widget--page {
  position: static;
  bottom: auto;
  left: auto;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}
.dev-comment-widget.dev-comment-widget--page .dev-comment-toggle,
.dev-comment-widget.dev-comment-widget--page .dev-comment-close {
  display: none;
}
.dev-comment-toggle {
  background: var(--md-blue, #0f78a5);
  color: #ffffff;
  border: none;
  border-radius: 50px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}
.dev-comment-panel {
  width: 360px;
  max-width: 100%;
  background: var(--md-white);
  border: 1px solid var(--md-border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  margin-top: 12px;
  display: none;
}
.dev-comment-panel.show {
  display: block;
}
.dev-comment-panel.dev-comment-panel--page {
  margin-top: 0;
  display: block;
}
.dev-comment-header {
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--md-blue), var(--md-blue-light));
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dev-comment-close {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  border-radius: 50%;
  color: #fff;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.dev-comment-form {
  padding: 16px;
}
.dev-comment-drop-zone {
  border: 2px dashed var(--md-border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  background: var(--md-gray-50);
  color: var(--md-text-light);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}
.dev-comment-drop-zone:hover {
  border-color: var(--md-blue);
  background: rgba(15, 120, 165, 0.05);
}
.dev-comment-file-preview .badge {
  margin-right: 6px;
}

/* ============================================
   SKELETON LOADER
   ============================================ */
.skeleton-card,
.skeleton-table,
.skeleton-list-item {
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
.skeleton-line,
.skeleton-button,
.skeleton-icon {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}
.skeleton-line {
  height: 12px;
  margin-bottom: 8px;
}
.skeleton-title {
  height: 20px;
  width: 60%;
  margin-bottom: 15px;
}
.skeleton-text {
  width: 100%;
}
.skeleton-button {
  height: 36px;
  width: 100px;
  margin-top: 10px;
}
.skeleton-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
}
.skeleton-stat {
  height: 14px;
  width: 80%;
  margin-bottom: 5px;
}
.skeleton-number {
  height: 28px;
  width: 50%;
}
.skeleton-table-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.skeleton-table-row .skeleton-line {
  flex: 1;
}
.skeleton-list-item {
  padding: 15px;
  border-bottom: 1px solid #e0e0e0;
}
@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* ============================================
   PROFILE PAGE
   ============================================ */
.profile-image-wrapper {
  position: relative;
  width: 150px;
  height: 150px;
  cursor: pointer;
}
.profile-image,
.profile-image-placeholder {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.profile-image-placeholder {
  background: linear-gradient(135deg, #2e5c8a 0%, #1a4d7e 100%);
  color: white;
}
.profile-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 150px;
  height: 150px;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: white;
  cursor: pointer;
}
.profile-image-wrapper:hover .profile-image-overlay {
  opacity: 1;
}
.profile-card-title {
  color: #2e5c8a;
  font-weight: 600;
}
.profile-card-hover:hover {
  box-shadow: 0 2px 8px rgba(46, 92, 138, 0.08) !important;
}

/* ============================================
   ADMIN STACK VIEW
   ============================================ */
.stack-card,
.stack-card-header,
.package-item,
.info-item,
.summary-stat {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.stack-section {
  margin-bottom: 30px;
  animation: fadeInUp 0.6s ease-out backwards;
}
.stack-section:nth-child(1) {
  animation-delay: 0.1s;
}
.stack-section:nth-child(2) {
  animation-delay: 0.2s;
}
.stack-section:nth-child(3) {
  animation-delay: 0.3s;
}
.stack-section:nth-child(4) {
  animation-delay: 0.4s;
}
.stack-section:nth-child(5) {
  animation-delay: 0.5s;
}
.stack-section:nth-child(6) {
  animation-delay: 0.6s;
}
.stack-section:nth-child(7) {
  animation-delay: 0.7s;
}
.stack-section:nth-child(8) {
  animation-delay: 0.8s;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}
.stack-card {
  border: 1px solid var(--md-border, #e4e9f0);
  border-radius: 12px;
  padding: 0;
  margin-bottom: 24px;
  background: var(--md-white, #ffffff);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  position: relative;
}
.stack-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--md-blue, #0f78a5), var(--md-blue-light, #3d99c1));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.stack-card:hover {
  box-shadow: 0 8px 24px rgba(15, 120, 165, 0.12);
}
.stack-card:hover::before {
  transform: scaleX(1);
}
.stack-card-header {
  background: linear-gradient(135deg, rgba(15, 120, 165, 0.08), rgba(61, 153, 193, 0.04));
  border-bottom: 2px solid var(--md-blue, #0f78a5);
  padding: 20px;
  margin: 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  -webkit-user-select: none;
  user-select: none;
}
.stack-card-header h4 {
  margin: 0;
  color: var(--md-blue, #0f78a5);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 600;
}
.stack-card-header h4 i {
  font-size: 20px;
  transition: transform 0.3s ease;
}
.stack-card.collapsed .stack-card-header h4 i,
.stack-card.collapsed .toggle-icon {
  transform: rotate(-90deg);
}
.stack-card-content {
  padding: 24px;
  max-height: 5000px;
  opacity: 1;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.stack-card.collapsed .stack-card-content {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}
.toggle-icon {
  transition: transform 0.3s ease;
  color: var(--md-blue, #0f78a5);
  font-size: 14px;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.status-badge.installed {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: white;
}
.status-badge.missing {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  animation: pulse 2s infinite;
}
.status-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.package-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  margin: 8px 0;
  background: var(--md-gray-50, #f8fafb);
  border-radius: 8px;
  border-left: 4px solid #ddd;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.package-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  transition: all 0.3s ease;
}
.package-item.installed {
  border-left-color: #27ae60;
  background: linear-gradient(90deg, rgba(39, 174, 96, 0.05), var(--md-gray-50, #f8fafb));
}
.package-item.installed::before {
  background: linear-gradient(180deg, #27ae60, #2ecc71);
}
.package-item.missing {
  border-left-color: #e74c3c;
  background: linear-gradient(90deg, rgba(231, 76, 60, 0.05), var(--md-gray-50, #f8fafb));
}
.package-item.missing::before {
  background: linear-gradient(180deg, #e74c3c, #c0392b);
}
.package-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-left-width: 6px;
}
.package-name {
  font-weight: 600;
  color: var(--md-text, #2c3e50);
  font-size: 14px;
}
.package-meta {
  color: var(--md-text-light);
  font-size: 12px;
}
.package-status {
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-item {
  background: var(--md-white);
  border: 1px solid var(--md-border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.info-item h5 {
  margin: 0 0 6px 0;
  font-weight: 700;
  color: var(--md-text);
}
.info-item p {
  margin: 0;
  color: var(--md-text-light);
}
.summary-stat {
  background: var(--md-white);
  border: 1px solid var(--md-border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.summary-stat .value {
  font-size: 22px;
  font-weight: 700;
  color: var(--md-blue);
}
.summary-stat .label {
  color: var(--md-text-light);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* ==========================================================
   Document Preview Modal (components/documents/preview-modal)
   ========================================================== */
.document-preview-modal .preview-filename {
  max-width: 300px;
}

.document-preview-modal .preview-body {
  min-height: 70vh;
  max-height: 80vh;
  overflow: hidden;
}

/* Default hidden states (JS toggles display) */
.document-preview-modal .preview-loading,
.document-preview-modal .preview-image-container,
.document-preview-modal .preview-pdf-container,
.document-preview-modal .preview-unsupported {
  display: none;
}

.document-preview-modal .preview-image-container {
  width: 100%;
  height: 100%;
}

.document-preview-modal .preview-image {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  cursor: zoom-in;
}

.document-preview-modal .preview-image.zoomed {
  max-height: none;
  cursor: zoom-out;
}

.document-preview-modal .preview-pdf-container {
  width: 100%;
  height: 75vh;
}

.document-preview-modal .preview-pdf-iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================================
   Click-to-Call Modal (components/click-to-call-modal)
   ========================================================== */
#clickToCallModal .ctc-avatar {
  width: 40px;
  height: 40px;
}

#clickToCallModal .ctc-link-existing {
  display: none;
}

/* ==========================================================
   Link Object Modal (components/link-object-modal)
   ========================================================== */
.md-link-results-list {
  max-height: 300px;
  overflow-y: auto;
}

/* ==========================================================
   Todo Checklist Modal (components/todo-checklist-modal)
   ========================================================== */
.todo-checklist-progress {
  height: 8px;
}

#todoChecklistProgressBar {
  width: 0%;
}

/* ==========================================================
   Email Reply Modal (components/email-reply-modal)
   ========================================================== */
#replyBodyPreview,
#aiSuggestionLoading,
#aiSuggestionResult {
  display: none;
}

#replyBodyContent.reply-body-content {
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
}

#aiSuggestionText {
  max-height: 150px;
  overflow-y: auto;
  white-space: pre-wrap;
  font-family: inherit;
  line-height: 1.5;
}

#emailReplyModal .card-header {
  font-size: 0.9rem;
}

#emailReplyModal .form-label {
  margin-bottom: 0.25rem;
}

@media (max-width: 575.98px) {
  #emailReplyModal .modal-dialog {
    margin: 0.5rem;
  }
  #emailReplyModal .row.g-2 > div {
    margin-bottom: 0.5rem;
  }
  #emailReplyModal #replyBody {
    min-height: 150px;
  }
  #emailReplyModal .modal-footer {
    flex-direction: column;
    gap: 0.5rem;
  }
  #emailReplyModal .modal-footer .btn {
    width: 100%;
  }
}
