/* 
 * BOOTSTRAPPED COMPONENTS 
 */

:root {
    /* Palette matched to image */
    --bg-body: #fbfbf9;
    /* Warm off-white */
    --bg-surface: #ffffff;
    --border-subtle: #eaeaea;
    --border-hover: #d1d1d1;

    --text-main: #1c1c1c;
    --text-muted: #858585;
    --text-light: #a1a1a1;

    --primary: #1a1a1a;
    --accent-blue: #2563eb;
    --accent-orange: #f97316;
}

/* Dark Mode Overrides */
:root:has(.dark),
.dark {
    --bg-body: var(--color-app-bg);
    --bg-surface: var(--color-panel-bg);
    --border-subtle: var(--color-highlight);
    --border-hover: #444444;

    --text-main: var(--color-primary-text);
    --text-muted: var(--color-secondary-text);
    /* --text-light: #6B7280; */
}

/* Scrollbar hidden but scrollable */
.custom-scrollbar {
  scrollbar-width: none;
}

.custom-scrollbar::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* Todo cards */
.todo-card {
  transition: transform .1s ease-in-out, box-shadow .1s ease-in-out;
  position: relative;
  z-index: 10;
  margin-bottom: .75rem;
  border-radius: .75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, .1);
}

.todo-card:hover {
  z-index: 20;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .3), 0 2px 4px -2px rgba(0, 0, 0, .3)
}

/* Columns */
.day-column {
  min-width: 285px;
  max-width: 285px;
  height: calc(100vh - 7rem);
  box-sizing: border-box;
  position: relative;
  border: 2px dashed rgb(222, 221, 221);
  background-color: #f5f5f5;
}

.dark .day-column {
  background-color: var(--color-highlight);
  border-color: var(--border-hover);
}

.day-column .task-list-area {
  border-radius: .75rem;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--task-list-bg, inherit);
  padding-right: 0;
  position: relative;
  min-height: 5rem;
  padding-top: 5px; 
}

/* Interaction Styles */
.drag-over {
  background-color: rgba(var(--color-accent-rgb), 0.05);
}

/* Tags */
.tag-pill {
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  margin-right: 0.25rem;
  margin-top: 0.25rem;
  display: inline-block;
  background: var(--color-highlight);
  color: var(--color-primary-text);
}

/* =========================================
   NEW CARD UI STYLES (Exp 2)
   ========================================= */
:root {
    /* New Variables for Card UI */
    --bg-card: #ffffff;
    --priority-high: #e53935;
    --priority-normal: #43a047;
    --priority-low: #1976d2;
    --tag-blue: #1976d2;
    --tag-green: #43a047;
    --tag-orange: #fb8c00;
    --tag-purple: #7e57c2;
    --due-urgent: #fb8c00;
    --due-normal: #666666;
    --border-light: #eeeeee;
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.dark {
    --bg-card: #2a2a3c;
    --border-light: #3a3a4c;
}

/* Task Card - Base */
.task-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative; /* For DnD positioning */
    border-width: 3px; /* Exp2 Thickness */
}

.task-card:hover {
    box-shadow: var(--shadow-card);
    border-color: #ddd;
    transform: translateY(-2px);
    z-index: 10;
}

.dark .task-card:hover {
    border-color: #555;
}

/* Pastel Card Backgrounds & Borders */
.task-card.pastel-rose { background: #fef2f2; border-color: rgba(239, 68, 68, 0.3); }
.task-card.pastel-rose:hover { border-color: #fca5a5; }

.task-card.pastel-mint { background: #ecfdf5; border-color: rgba(34, 197, 94, 0.3); }
.task-card.pastel-mint:hover { border-color: #86efac; }

.task-card.pastel-lavender { background: #f5f3ff; border-color: rgba(168, 85, 247, 0.3); }
.task-card.pastel-lavender:hover { border-color: #d8b4fe; }

.task-card.pastel-sky { background: #e0f2fe; border-color: rgba(14, 165, 233, 0.3); }
.task-card.pastel-sky:hover { border-color: #7dd3fc; }

.task-card.pastel-peach { background: #fcfee0; border-color: rgba(245, 158, 11, 0.3); }
.task-card.pastel-peach:hover { border-color: #fcd34d; }

/* Dark Mode Pastels (Subtle)
.dark .task-card.pastel-rose { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.3); color: #eccaca; }
.dark .task-card.pastel-mint { background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.3); color: #ccecca; }
.dark .task-card.pastel-lavender { background: rgba(168, 85, 247, 0.1); border-color: rgba(168, 85, 247, 0.3); color: #eeccee; }
.dark .task-card.pastel-sky { background: rgba(14, 165, 233, 0.1); border-color: rgba(14, 165, 233, 0.3); color: #cceeff; }
.dark .task-card.pastel-peach { background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.3); color: #ffeecb; } */


/* Card Tags Row */
.task-tags {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 8px;
    margin-bottom: 2px;
}
.task-tags::-webkit-scrollbar {
  display: none;
}

.tag {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #f5f5f5;
    color: var(--text-secondary);
}
/* .dark .tag { background: rgba(255,255,255,0.1); color: #ccc; } */

.tag svg { width: 12px; height: 12px; }

.tag.priority-high { background: #ffebee; color: var(--priority-high); }
.tag.priority-normal { background: #e8f5e9; color: var(--priority-normal); }
.tag.priority-low { background: #e3f2fd; color: var(--priority-low); }

/* .dark .tag.priority-high { background: rgba(229, 57, 53, 0.2); }
.dark .tag.priority-normal { background: rgba(67, 160, 71, 0.2); }
.dark .tag.priority-low { background: rgba(25, 118, 210, 0.2); } */

/* Dynamic Tag Coloring based on Card Context */
.task-card.pastel-rose .tag { background: rgba(255,255,255,0.6); color: #b91c1c; }
.task-card.pastel-rose .tag.priority-high { background: #fee2e2; color: #b91c1c; }

.task-card.pastel-mint .tag { background: rgba(255,255,255,0.6); color: #15803d; }
.task-card.pastel-mint .tag.priority-low { background: #dcfce7; color: #15803d; }

.task-card.pastel-peach .tag { background: rgba(255,255,255,0.6); color: #854d0e; }
.task-card.pastel-peach .tag.priority-normal { background: #fef9c3; color: #854d0e; }

.task-card.pastel-sky .tag { background: rgba(255,255,255,0.6); color: #0369a1; }
.task-card.pastel-sky .tag.priority-low { background: #e0f2fe; color: #0369a1; }

.task-card.pastel-lavender .tag { background: rgba(255,255,255,0.6); color: #7e22ce; }

/* Dark Mode Dynamic Tags
.dark .task-card.pastel-rose .tag { background: rgba(255,255,255,0.1); color: #fca5a5; }
.dark .task-card.pastel-mint .tag { background: rgba(255,255,255,0.1); color: #86efac; }
.dark .task-card.pastel-peach .tag { background: rgba(255,255,255,0.1); color: #fdba74; }
.dark .task-card.pastel-sky .tag { background: rgba(255,255,255,0.1); color: #7dd3fc; }
.dark .task-card.pastel-lavender .tag { background: rgba(255,255,255,0.1); color: #d8b4fe; } */


/* Task Title */
.task-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #41444B; /* Adapted var */
    margin-bottom: 2px;
    margin-left: 5px;
    line-height: 1.4;
}

/* Task Subtitle */
.task-subtitle {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted); /* Adapted var */
    margin-bottom: 14px;
    margin-left: 7px;
}

.task-subtitle svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transform: scale(-1, -1);
    margin-top: 2px;
}

/* Task Footer */
.task-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Task Meta */
.task-meta {
    display: flex;
    align-items: center;
    gap: 14px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 5px;
}

.meta-item svg { width: 14px; height: 14px; }
.meta-item.urgent { color: var(--due-urgent); }

/* Progress Bar */
.progress-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 4px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: #e5e5e5;
    border-radius: 2px;
    overflow: hidden;
}
/* .dark .progress-bar { background: #444; } */

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #43a047, #66bb6a);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.7rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Main Header - ADAPTED FROM CALENDAR */
.timeline-header {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 14px;
    padding-right: 14px;
    padding-top: 15px;
    padding-bottom: 0px;
    border-bottom: none;
    flex-shrink: 0;
    background: transparent;
}

/* Using inline styles for title/controls mostly, but here are helpers if needed */
.timeline-nav {
   display: flex;
   align-items: center;
   gap: 4px;
   background: var(--color-input-bg);
   padding: 4px;
   border-radius: 8px;
}


/* --- MODAL STYLES --- */
#task-form-modal {
  align-items: flex-start;
  justify-content: flex-end;
  pointer-events: none;
  transition: background-color .3s;
  z-index: 10000;
}

#task-form-modal>.absolute.inset-0 {
  pointer-events: all;
}

#task-modal-content {
  margin: 0;
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 100%;
  max-width: 400px;
  border-radius: 0;
  box-shadow: 0 0 20px rgba(0, 0, 0, .3);
  transform: translateX(100%);
  opacity: 1;
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  pointer-events: auto;
  z-index: 10;
}

#task-form-modal.is-open #task-modal-content {
  transform: translateX(0);
}

/* Task Description Multi-line Clamp */
.task-desc-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    word-break: break-word;
    line-height: 1.3;
}

/* Additions for new color options */
.task-card.pastel-orange { background: #ffedd5; border-color: rgba(249, 115, 22, 0.3); }
.task-card.pastel-orange:hover { border-color: #fdba74; }

.task-card.pastel-teal { background: #ccfbf1; border-color: rgba(20, 184, 166, 0.3); }
.task-card.pastel-teal:hover { border-color: #5eead4; }

.task-card.pastel-blue { background: #dbeafe; border-color: rgba(59, 130, 246, 0.3); }
.task-card.pastel-blue:hover { border-color: #93c5fd; }

.task-card.pastel-indigo { background: #e0e7ff; border-color: rgba(99, 102, 241, 0.3); }
.task-card.pastel-indigo:hover { border-color: #a5b4fc; }

.task-card.pastel-pink { background: #fce7f3; border-color: rgba(236, 72, 153, 0.3); }
.task-card.pastel-pink:hover { border-color: #f9a8d4; }

.task-card.pastel-gray { background: #f3f4f6; border-color: rgba(107, 114, 128, 0.3); }
.task-card.pastel-gray:hover { border-color: #d1d5db; }

/* Tag styles for new pastels */
.task-card.pastel-orange .tag { background: rgba(255,255,255,0.6); color: #c2410c; }
.task-card.pastel-teal .tag { background: rgba(255,255,255,0.6); color: #0f766e; }
.task-card.pastel-blue .tag { background: rgba(255,255,255,0.6); color: #1d4ed8; }
.task-card.pastel-indigo .tag { background: rgba(255,255,255,0.6); color: #4338ca; }
.task-card.pastel-pink .tag { background: rgba(255,255,255,0.6); color: #be185d; }
.task-card.pastel-gray .tag { background: rgba(255,255,255,0.6); color: #374151; }
