.dialog {
  position: relative;
  background-color: rgba(76, 76, 76, 0.1);
  border-radius: 15px;
  border: none;
  box-shadow: 0 4px 6px #00000040;
  backdrop-filter: blur(12.5px) brightness(100%);
  -webkit-backdrop-filter: blur(12.5px) brightness(100%);
  min-height: 260px;
  padding: 1.5rem 1.5rem 1.5rem 1.5rem;
}

.dialog::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: 15px;
  background: linear-gradient( 179deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.08) 100% );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

.dialog .text-wrapper {
  font-family: "Figtree", Helvetica, Arial, sans-serif;
  font-weight: 500;
  color: #fff;
  font-size: 1.125rem;
  line-height: 1.4;
  position: relative;
  z-index: 2;
}

.dialog-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  filter: invert(1);
}

.modal-backdrop {
  background-color: transparent !important;
}

.custom-btn {
  border: none;
  border-radius: 30px;
  padding: 0.5rem 2rem;
  font-family: "Figtree", Helvetica, sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  text-align: center;
  letter-spacing: 0;
  line-height: 21px;
  cursor: pointer;
  box-shadow: 0px 4px 4px #0000001a;
  background: linear-gradient( 90deg, rgba(3, 147, 154, 1) 0%, rgba(4, 157, 89, 1) 21%, rgba(52, 110, 130, 1) 50%, rgba(4, 170, 89, 1) 100% );
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease-in-out;
}

.custom-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: 30px;
  background: linear-gradient( 178deg, rgba(255, 255, 255, 1) 0%, rgba(7, 166, 93, 1) 6% );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

.custom-btn:hover {
  background: linear-gradient( 90deg, rgba(4, 169, 90, 1) 0%, rgba(52, 111, 130, 1) 28%, rgba(52, 110, 130, 1) 72%, rgba(4, 170, 89, 1) 100% );
  color: #fff;
}

.custom-btn:active {
  background: linear-gradient( 90deg, rgba(52, 110, 130, 1) 0%, rgba(48, 115, 127, 1) 28%, rgba(52, 110, 130, 1) 72%, rgba(47, 116, 126, 1) 100% );
  box-shadow: 0px 2px 3px #00000033 inset;
  color: #fff;
}

.custom-btn:focus-visible {
  outline: 2px solid #4a90e2;
  outline-offset: 2px;
}

h4 {
  font-size: 1.3em;
}

.container-flex {
  display: flex;
}

.container-flex {
  width: 100%;
  max-width: 100%;
}

/* desktop breakpoint, same as Bootstrap's sm */
@media (min-width: 576px) {
  .container-flex {
    width: 500px;
  }
}

/* ========================================================================
   Action Instances Kanban Board Styles
   ======================================================================== */

/**
 * Action Instances Kanban Board Styles
 *
 * Implements a 3-column Kanban layout with drag-and-drop visual feedback
 * Based on frontend reference implementation with ProspectsRadar design system
 */

/* Kanban Board Container - 3 Column Grid Layout */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  height: calc(100vh - 280px);
  min-height: 500px;
  padding: 0;
}

/* Individual Column Styling */
.kanban-column {
  display: flex;
  flex-direction: column;
  background: rgba(26, 61, 77, 0.2);
  border-radius: 12px;
  padding: 1rem;
  min-height: 0;
  overflow: hidden;
}

/* Column Header with Title and Count Badge */
.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.kanban-column-title {
  font-size: 1rem;
  font-weight: 600;
  color: white;
  margin: 0;
}

.kanban-column-count {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 12px;
  font-size: 0.8125rem;
  font-weight: 600;
}

/* Scrollable Column Content Area */
.kanban-column-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-right: 0.25rem;
  min-height: 100px;
}

/* Custom Scrollbar for Column Content */
.kanban-column-content::-webkit-scrollbar {
  width: 6px;
}

.kanban-column-content::-webkit-scrollbar-track {
  background: transparent;
}

.kanban-column-content::-webkit-scrollbar-thumb {
  background: rgba(26, 61, 77, 0.3);
  border-radius: 3px;
}

.kanban-column-content::-webkit-scrollbar-thumb:hover {
  background: rgba(26, 61, 77, 0.5);
}

/* Action Instance Card - Default State */
.action-instance-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
  cursor: move;
  user-select: none;
}

.action-instance-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Card Being Dragged - Visual Feedback */
.action-instance-card.dragging {
  opacity: 0.5;
  transform: rotate(2deg);
  cursor: grabbing;
}

/* Placeholder - Full card size, height set by JavaScript */
.action-instance-card-placeholder,
.task-card-placeholder {
  background: rgba(59, 130, 246, 0.08);
  border: 2px dashed rgba(59, 130, 246, 0.5);
  border-radius: 8px;
  flex-shrink: 0;
}

/* Empty Column Message */
.empty-column-message {
  text-align: center;
  padding: 2rem 1rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  font-style: italic;
}

/* Card Content Styling */
.action-instance-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.action-instance-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  flex: 1;
  margin: 0 0.5rem 0 0;
}

/* Card Actions (Edit, Delete buttons) */
.task-actions {
  display: flex;
  gap: 0.5rem;
}

.task-action-btn {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 0.375rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.task-action-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.action-instance-card-description {
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0 0 0.75rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.action-instance-card-meta {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
}

.task-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.action-instance-card-badge,
.task-badge {
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Date Display Styling */
.task-date {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: #64748b;
}

.task-date i {
  font-size: 0.8125rem;
}

.task-date.overdue {
  color: #ef4444;
  font-weight: 500;
}

.task-date.due-today {
  color: #f59e0b;
  font-weight: 500;
}

/* Priority Badges */
.priority-badge,
.home-priority-badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
}

.priority-badge.priority-urgent,
.home-priority-badge.priority-urgent {
  background: #fee2e2;
  color: #dc2626;
}

.priority-badge.priority-high,
.home-priority-badge.priority-high {
  background: #fef3c7;
  color: #d97706;
}

.priority-badge.priority-normal,
.home-priority-badge.priority-normal {
  background: #dbeafe;
  color: #2563eb;
}

.priority-badge.priority-low,
.home-priority-badge.priority-low {
  background: #f1f5f9;
  color: #64748b;
}

/* Responsive Breakpoints */
@media (max-width: 1280px) {
  .kanban-board {
    grid-template-columns: repeat(3, minmax(250px, 1fr));
    gap: 1rem;
  }

  .action-instance-card {
    padding: 0.875rem;
  }
}

@media (max-width: 1024px) {
  .kanban-board {
    height: calc(100vh - 240px);
  }

  .kanban-column {
    padding: 0.875rem;
  }

  .action-instance-card-title {
    font-size: 0.9375rem;
  }
}

@media (max-width: 768px) {
  /* Stack columns vertically on mobile */
  .kanban-board {
    grid-template-columns: 1fr;
    height: auto;
    gap: 1.5rem;
  }

  .kanban-column {
    min-height: 300px;
    max-height: 500px;
  }

  /* Disable drag on mobile - use tap interactions instead */
  .action-instance-card {
    cursor: default;
  }

  .action-instance-card.dragging {
    opacity: 1;
    transform: none;
  }
}

/* Print Styles */
@media print {
  .kanban-board {
    display: block;
    height: auto;
  }

  .kanban-column {
    page-break-inside: avoid;
    break-inside: avoid;
    margin-bottom: 2rem;
  }

  .action-instance-card {
    cursor: default;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .action-instance-card-placeholder {
    display: none;
  }
}

