/* task-detail-popup.css */

/* ========================================
   OVERLAY & CONTAINER
   ======================================== */

.task-detail-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--surface-overlay, rgba(0, 0, 0, 0.75));
    backdrop-filter: blur(var(--blur-sm, 8px));
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 48px 16px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-fast, 0.2s ease), visibility var(--transition-fast, 0.2s ease);
}

.task-detail-popup-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.task-detail-popup {
    background: var(--surface-solid, #1a1a2e);
    border-radius: var(--radius-lg, 12px);
    width: 100%;
    max-width: 900px;
    max-height: calc(100vh - 96px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 
        var(--shadow-xl, 0 16px 48px rgba(0, 0, 0, 0.3)),
        0 0 0 1px var(--border-default, rgba(255, 255, 255, 0.05));
    position: relative;
    transform: translateY(-20px) scale(0.98);
    opacity: 0;
    transition: transform var(--transition-normal, 0.25s ease), opacity var(--transition-normal, 0.25s ease);
}

.task-detail-popup.visible {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* ========================================
   DROP OVERLAY (full popup drag & drop)
   ======================================== */

.popup-drop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(2, 20, 58, 0.95);
    border: 3px dashed var(--accent, #6366f1);
    border-radius: var(--radius-lg, 12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.popup-drop-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.popup-drop-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--accent, #6366f1);
    background: var(--surface-solid, #1a1a2e);
    padding: 32px 48px;
    border-radius: var(--radius-md, 8px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.popup-drop-indicator svg {
    width: 48px;
    height: 48px;
    stroke: var(--accent, #6366f1);
}

.popup-drop-indicator span {
    font-size: 16px;
    font-weight: 600;
}

/* ========================================
   CLOSE BUTTON
   ======================================== */

.popup-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 0;
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.15s ease;
}

.popup-close-btn:hover {
    background: transparent;
    color: #ffffff;
    transform: scale(1.1);
}

.popup-close-btn svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* ========================================
   NAVIGATION BUTTONS (inline with title)
   ======================================== */

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

.nav-arrow {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: var(--radius-full, 50%);
    background: var(--accent, #6366f1);
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast, 0.15s ease);
}

.nav-arrow:hover {
    background: var(--accent-hover, #5558e3);
    transform: scale(1.05);
}

.nav-arrow:active {
    transform: scale(0.95);
}

.nav-arrow svg {
    width: 24px;
    height: 24px;
    display: block;
}

/* ========================================
   COVER IMAGE
   ======================================== */

.task-cover-image {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: #3b82f6;
    display: none;
    flex-shrink: 0;
}

.task-cover-image[style*="display: block"] {
    display: block;
}

/* ========================================
   MAIN CONTENT LAYOUT
   ======================================== */

.popup-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.popup-left-column {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    border-right: 1px solid var(--border-default, rgba(255, 255, 255, 0.08));
}

.popup-right-column {
    width: 340px;
    flex-shrink: 0;
    padding: 0;
    overflow-y: auto;
    background: var(--bg-tertiary, rgba(0, 0, 0, 0.15));
    display: flex;
    flex-direction: column;
}

/* Tab Navigation */
.right-column-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-default, rgba(255, 255, 255, 0.08));
    flex-shrink: 0;
}

.tab-btn {
    flex: 1;
    padding: 14px 16px;
    background: transparent;
    border: none;
    color: var(--text-muted, #71717a);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 2px solid transparent;
}

.tab-btn:hover {
    color: var(--text-secondary, #a1a1aa);
    background: var(--surface-elevated, rgba(255, 255, 255, 0.05));
}

.tab-btn.active {
    color: var(--text-primary, #f5f5f7);
    border-bottom-color: var(--accent, #6366f1);
    background: transparent;
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 16px;
    flex: 1;
    overflow-y: auto;
}

.tab-content.active {
    display: block;
}

/* ========================================
   TITLE SECTION
   ======================================== */

.task-title-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--surface-elevated, rgba(255, 255, 255, 0.05));
    border-radius: var(--radius-md, 8px);
    padding: 8px 16px;
}

.task-title-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary, #f5f5f7);
    font-size: 18px;
    font-weight: 600;
    padding: 4px 0;
    outline: none;
    text-align: center;
    min-width: 0;
}

.task-title-input::placeholder {
    color: var(--text-muted, #71717a);
}

/* ========================================
   CHECKBOX STYLING
   ======================================== */

.checkbox-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-custom {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-wrapper input:checked + .checkbox-custom {
    background: #22c55e;
    border-color: #22c55e;
}

.checkbox-wrapper input:checked + .checkbox-custom::after {
    content: '✓';
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-wrapper:hover .checkbox-custom {
    border-color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   QUICK ACTIONS
   ======================================== */

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--surface-elevated, rgba(255, 255, 255, 0.05));
    border: 1px solid var(--border-default, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-sm, 6px);
    color: var(--text-secondary, #a1a1aa);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast, 0.15s ease);
}

.quick-action-btn:hover {
    background: var(--surface-elevated-hover, rgba(255, 255, 255, 0.1));
    color: var(--text-primary, #f5f5f7);
    border-color: var(--border-hover, rgba(255, 255, 255, 0.15));
}

.quick-action-btn svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* ========================================
   LABELS SECTION
   ======================================== */

.labels-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.labels-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.label-chip {
    height: 32px;
    min-width: 48px;
    padding: 0 12px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.add-label-btn {
    width: 40px;
    height: 32px;
    border-radius: var(--radius-sm, 4px);
    background: var(--surface-elevated, rgba(255, 255, 255, 0.05));
    border: 1px dashed var(--border-default, rgba(255, 255, 255, 0.15));
    color: var(--text-muted, #71717a);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast, 0.15s ease);
}

.add-label-btn svg {
    width: 18px;
    height: 18px;
    display: block;
}

.add-label-btn:hover {
    background: var(--surface-elevated-hover, rgba(255, 255, 255, 0.1));
    border-color: var(--accent, #6366f1);
    color: var(--accent, #6366f1);
}

.add-label-btn:hover svg {
    stroke: var(--accent, #6366f1);
}

/* ========================================
   MEMBERS SECTION
   ======================================== */

.members-section {
    margin-bottom: 16px;
}

.section-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.members-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.member-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
}

.member-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background-color: var(--avatar-color, #6366f1);
    cursor: pointer;
    transition: background-color 0.15s;
    position: relative;
}

.member-avatar .member-initial {
    transition: opacity 0.15s;
}

.member-avatar .member-remove-x {
    position: absolute;
    opacity: 0;
    font-size: 14px;
    transition: opacity 0.15s;
}

.member-avatar:hover {
    background-color: #ef4444;
}

.member-avatar:hover .member-initial {
    opacity: 0;
}

.member-avatar:hover .member-remove-x {
    opacity: 1;
}

.member-name {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
}

/* ========================================
   DUE DATE SECTION
   ======================================== */

.due-date-section {
    margin-bottom: 16px;
}

.due-date-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-range {
    padding: 6px 12px;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    color: #60a5fa;
    font-size: 13px;
    font-weight: 500;
}

/* ========================================
   TIMELINE BADGE
   ======================================== */

.timeline-badge-section {
    margin-bottom: 20px;
}

.section-label-small {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    display: block;
    margin-bottom: 4px;
}

.timeline-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 4px;
    color: #60a5fa;
    font-size: 13px;
    font-weight: 500;
}

/* ========================================
   SECTION HEADERS
   ======================================== */

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.section-header svg {
    color: var(--text-muted, #71717a);
}

.section-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, rgba(255, 255, 255, 0.9));
    flex: 1;
}

/* ========================================
   CALENDAR SECTION - Progress Bar Timeline
   ======================================== */

.calendar-section {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.calendar-days {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 350px;
}

.timeline-progress {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px;
    background: var(--surface-elevated, rgba(255, 255, 255, 0.03));
    border-radius: var(--radius-md, 8px);
}

.timeline-dates {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timeline-date-wrapper {
    position: relative;
    cursor: pointer;
}

.timeline-date-display {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary, #a1a1aa);
    pointer-events: none;
}

.timeline-date-wrapper:hover .timeline-date-display {
    color: var(--text-primary, #f5f5f7);
}

.timeline-date-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Light theme - use blue progress bar */
[data-theme="light"] .timeline-bar-fill {
    background: linear-gradient(90deg, var(--accent, #6366f1) 0%, var(--color-info, #3b82f6) 100%);
}

.timeline-bar {
    position: relative;
    height: 10px;
    background: var(--surface-elevated, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-full, 9999px);
    overflow: visible;
}

.timeline-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent, #6366f1) 0%, var(--accent-light, #818cf8) 100%);
    border-radius: var(--radius-full, 9999px);
    transition: width 0.3s ease;
}

.timeline-progress.past .timeline-bar-fill {
    background: linear-gradient(90deg, var(--color-success, #22c55e) 0%, var(--color-success-light, #4ade80) 100%);
}

.timeline-progress.future .timeline-bar-fill {
    width: 0 !important;
}

.timeline-today-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.today-dot {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--color-success, #22c55e) 0%, var(--color-success-dark, #16a34a) 100%);
    border-radius: 50%;
    border: 4px solid var(--surface-solid, #1a1a2e);
    box-shadow: 
        0 0 16px var(--color-success-glow, rgba(34, 197, 94, 0.5)),
        0 0 32px rgba(34, 197, 94, 0.3);
}

/* Light theme today dot border */
[data-theme="light"] .today-dot {
    border-color: var(--bg-primary, #ffffff);
}

/* ========================================
   DESCRIPTION SECTION
   ======================================== */

.description-section {
    margin-bottom: 24px;
}

.task-description-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    background: var(--input-bg, rgba(0, 0, 0, 0.3));
    border: 1px solid var(--input-border, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-md, 8px);
    color: var(--input-text, #f5f5f7);
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    transition: border-color var(--transition-fast, 0.15s ease), background var(--transition-fast, 0.15s ease);
}

.task-description-textarea:focus {
    background: var(--surface-elevated, rgba(255, 255, 255, 0.05));
    border-color: var(--input-border-focus, #6366f1);
}

.task-description-textarea::placeholder {
    color: var(--input-placeholder, #71717a);
}

.description-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.description-save-btn {
    padding: 6px 16px;
    background: #579dff;
    color: #1d2125;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.description-save-btn:hover {
    background: #85b8ff;
}

.description-cancel-btn {
    padding: 6px 16px;
    background: transparent;
    color: var(--text-secondary, #9fadbc);
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.description-cancel-btn:hover {
    background: var(--surface-elevated-hover, rgba(255, 255, 255, 0.08));
}

/* ========================================
   CHECKLIST SECTION
   ======================================== */

.checklist-section {
    margin-bottom: 24px;
}

.checklist-name-input {
    flex: 1;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--text-primary, #f5f5f7);
    font-size: 16px;
    font-weight: 600;
    padding: 2px 6px;
    margin: 0;
    outline: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.checklist-name-input:hover {
    background: var(--surface-elevated, rgba(255, 255, 255, 0.05));
}

.checklist-name-input:focus {
    background: var(--surface-elevated, rgba(255, 255, 255, 0.05));
    border-color: var(--input-border-focus, #6366f1);
}

.delete-checklist-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
}

.delete-checklist-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Progress Bar */
.checklist-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.checklist-progress-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    min-width: 32px;
}

.checklist-progress-track {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.checklist-progress-bar {
    height: 100%;
    width: 0%;
    background: #3b82f6;
    border-radius: 3px;
    transition: width 0.3s ease, background 0.3s ease;
}

.checklist-progress-bar.complete {
    background: #22c55e;
}

/* Checklist Items */
.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    transition: background 0.15s ease;
}

.checklist-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.checklist-item.checked .checklist-item-text {
    text-decoration: line-through;
    color: rgba(255, 255, 255, 0.4);
}

.checklist-item .checkbox-custom {
    width: 18px;
    height: 18px;
    border-radius: 4px;
}

.checklist-item-text {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary, rgba(255, 255, 255, 0.9));
    font-size: 14px;
    outline: none;
    padding: 2px 0;
}

.checklist-item-text:focus {
    background: var(--surface-elevated, rgba(255, 255, 255, 0.05));
    border-radius: var(--radius-xs, 4px);
    padding: 2px 6px;
    margin: 0 -6px;
}

.checklist-item-delete {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.checklist-item:hover .checklist-item-delete {
    opacity: 1;
}

.checklist-item-delete:hover {
    color: #ef4444;
}

/* Add Item */
.checklist-add-item {
    display: flex;
    gap: 8px;
}

.checklist-new-item-input {
    flex: 1;
    padding: 10px 12px;
    background: var(--input-bg, rgba(0, 0, 0, 0.3));
    border: 1px solid var(--input-border, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-sm, 6px);
    color: var(--input-text, #f5f5f7);
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition-fast, 0.15s ease);
}

.checklist-new-item-input:focus {
    border-color: var(--input-border-focus, #6366f1);
}

.checklist-new-item-input::placeholder {
    color: var(--input-placeholder, #71717a);
}

.checklist-add-btn {
    padding: 10px 16px;
    background: var(--accent, #6366f1);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
}

.checklist-add-btn:hover {
    background: #2563eb;
}

/* ========================================
   ATTACHMENTS SECTION
   ======================================== */

.attachments-section {
    margin-bottom: 24px;
}

.attachments-section.drag-over {
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
}

.add-attachment-btn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    padding: 4px 10px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.add-attachment-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

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

.no-attachments {
    padding: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 13px;
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: background 0.15s ease;
}

.attachment-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.attachment-thumbnail {
    width: 80px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.attachment-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-icon {
    color: rgba(255, 255, 255, 0.4);
}

.attachment-info {
    flex: 1;
    min-width: 0;
}

.attachment-name {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.attachment-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.attachment-actions {
    display: flex;
    gap: 4px;
}

.attachment-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}

.attachment-action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.attachment-action-btn.delete-attachment-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* ========================================
   UPLOAD AREA
   ======================================== */

.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px;
    margin-top: 12px;
}

.upload-drop-zone {
    width: 100%;
    padding: 24px;
    border: 2px dashed var(--border-default, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-md, 8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all var(--transition-fast, 0.15s ease);
    opacity: 0;
    pointer-events: none;
}

.upload-area:hover .upload-drop-zone,
.upload-area.drag-over .upload-drop-zone {
    opacity: 1;
    pointer-events: auto;
}

.upload-area.drag-over .upload-drop-zone {
    border-color: var(--accent, #6366f1);
    background: var(--accent-subtle, rgba(99, 102, 241, 0.15));
}

.upload-drop-zone svg {
    color: var(--text-muted, #71717a);
}

.upload-drop-zone span {
    font-size: 13px;
    color: var(--text-muted, #71717a);
}

.upload-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--surface-elevated, rgba(255, 255, 255, 0.05));
    border: 1px solid var(--border-default, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-md, 8px);
    color: var(--text-secondary, #a1a1aa);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast, 0.15s ease);
}

.upload-btn:hover {
    background: var(--surface-elevated-hover, rgba(255, 255, 255, 0.1));
    color: var(--text-primary, #f5f5f7);
    border-color: var(--border-hover, rgba(255, 255, 255, 0.15));
}

.upload-btn svg {
    opacity: 0.7;
}

/* ========================================
   RIGHT COLUMN - ACTIVITY
   ======================================== */

.activity-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.activity-header svg {
    color: rgba(255, 255, 255, 0.5);
}

.activity-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    flex: 1;
}

.toggle-details-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.15s ease;
}

.toggle-details-btn:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Comment Input */
.comment-input-section {
    margin-bottom: 20px;
}

.comment-input {
    width: 100%;
    min-height: 60px;
    padding: 12px;
    background: var(--input-bg, rgba(0, 0, 0, 0.3));
    border: 1px solid var(--input-border, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-md, 8px);
    color: var(--input-text, #f5f5f7);
    font-size: 14px;
    line-height: 1.4;
    resize: none;
    outline: none;
    margin-bottom: 8px;
    transition: border-color var(--transition-fast, 0.15s ease);
}

.comment-input:focus {
    border-color: var(--input-border-focus, #6366f1);
}

.comment-input::placeholder {
    color: var(--input-placeholder, #71717a);
}

.comment-submit-btn {
    padding: 8px 16px;
    background: var(--accent, #6366f1);
    border: none;
    border-radius: var(--radius-sm, 6px);
    color: var(--text-on-accent, #fff);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
}

.comment-submit-btn:hover {
    background: #2563eb;
}

/* Comment Items */
.comment-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #6366f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-user {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.comment-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.comment-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-list.collapsed .activity-item:not(.comment) {
    display: none;
}

.activity-item {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 4px 0;
}

.activity-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #6366f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
}

.activity-header-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
}

.activity-user {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.activity-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.activity-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    margin-left: auto;
}

.activity-time:hover {
    color: rgba(255, 255, 255, 0.6);
}

.activity-comment-text {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    margin-top: 6px;
}

.activity-attachment-preview {
    margin-top: 8px;
    border-radius: 8px;
    overflow: hidden;
    max-width: 200px;
}

.activity-attachment-preview img {
    width: 100%;
    display: block;
}

/* ========================================
   LIGHTBOX
   ======================================== */

.attachment-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ========================================
   PICKERS (Labels, Members, Dates)
   ======================================== */

.labels-picker,
.members-picker,
.date-notification {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 15000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.picker-content,
.notification-content {
    background: #1a1f2e;
    border-radius: 12px;
    padding: 20px;
    width: fit-content;
    min-width: 280px;
    max-width: 320px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.picker-content h4,
.notification-content h4 {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.notification-content p {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.color-option {
    width: 40px;
    height: 32px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.picker-close,
.notification-close {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.picker-close:hover,
.notification-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */

.popup-left-column::-webkit-scrollbar,
.popup-right-column::-webkit-scrollbar,
.activity-list::-webkit-scrollbar {
    width: 6px;
}

.popup-left-column::-webkit-scrollbar-track,
.popup-right-column::-webkit-scrollbar-track,
.activity-list::-webkit-scrollbar-track {
    background: transparent;
}

.popup-left-column::-webkit-scrollbar-thumb,
.popup-right-column::-webkit-scrollbar-thumb,
.activity-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.popup-left-column::-webkit-scrollbar-thumb:hover,
.popup-right-column::-webkit-scrollbar-thumb:hover,
.activity-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .task-detail-popup-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .task-detail-popup {
        max-width: 100%;
        max-height: 90vh;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
    }

    .task-detail-popup.visible {
        transform: translateY(0);
    }

    .popup-content {
        flex-direction: column;
    }

    .popup-left-column {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .popup-right-column {
        width: 100%;
    }

    .quick-actions {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .quick-action-btn {
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .popup-left-column,
    .popup-right-column {
        padding: 16px;
    }

    .task-title-input {
        font-size: 20px;
    }

    .attachment-thumbnail {
        width: 60px;
        height: 42px;
    }
}

/* ============================================
   TRELLO IMAGE BRIDGE - CSS ADDITIONS
   Add this to your existing TaskDetailPopup styles
   ============================================ */

/* Trello source badge on attachments */
.attachment-source-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 5px;
    border-radius: 3px;
    background: #0079bf;
    color: white;
    margin-left: 6px;
    vertical-align: middle;
}

/* Loading state for uploads */
.attachment-item.uploading {
    opacity: 0.6;
    pointer-events: none;
}

.attachment-item.uploading::after {
    content: 'Uploading...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: #666;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Attachment thumbnail improvements for URL-based images */
.attachment-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}


/* Checklist Drag-and-Drop Styles */
/* Add this to task-detail-popup.css */

.checklist-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.15s ease, transform 0.15s ease;
    cursor: default;
}

.checklist-item.dragging {
    opacity: 0.5;
    background: var(--surface-elevated, rgba(255,255,255,0.1));
}

.checklist-item.drag-over-above {
    border-top: 2px solid var(--accent-primary, #4dabf7);
    margin-top: -2px;
}

.checklist-item.drag-over-below {
    border-bottom: 2px solid var(--accent-primary, #4dabf7);
    margin-bottom: -2px;
}

.checklist-drag-handle {
    cursor: grab;
    opacity: 0.4;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: opacity 0.15s ease;
    flex-shrink: 0;
}

.checklist-drag-handle:hover {
    opacity: 0.8;
}

.checklist-drag-handle:active {
    cursor: grabbing;
}

.checklist-item:hover .checklist-drag-handle {
    opacity: 0.6;
}

/* ========================================
   ICON STYLING FOR IMG TAGS
   ======================================== */

.popup-close-btn .popup-icon {
    width: 25px;
    height: 25px;
    filter: brightness(0) invert(1);
    opacity: 0.7;
    display: block;
}

.nav-arrow .nav-icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    display: block;
}

.popup-close-btn:hover .popup-icon,
.nav-arrow:hover .nav-icon {
    opacity: 1;
}