/* AI todo board component rules
   Source: ai-todo-board.css. Generated by CSS split refactor; do not edit original during staging. */

.ai-todo-detail .field {
    position: relative;
}

.ai-todo-input {
    min-height: 112px;
}

.field-label {
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ai-todo-date-input {
    min-height: 42px;
}

.ai-todo-search-wrap {
    position: relative;
    width: min(220px, 24vw);
    min-width: 170px;
}

.ai-todo-search-field {
    background: rgba(255,255,255,0.94);
}

.ai-todo-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 35;
    display: grid;
    gap: 8px;
    padding: 10px;
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.94);
    background: rgba(255,255,255,0.98);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
}

.ai-todo-search-result-btn {
    display: grid;
    justify-items: start;
    gap: 4px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    text-align: left;
    background: rgba(248,250,252,0.96);
    color: #0f172a;
    box-shadow: none;
}

.ai-todo-search-result-btn:hover {
    background: rgba(239,246,255,0.98);
}

.ai-todo-search-result-meta,
.ai-todo-search-empty {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.ai-todo-search-empty {
    padding: 12px 14px;
}

.ai-todo-week-count {
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.16);
    color: #f8fafc;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.ai-todo-section-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.24);
    background: rgba(255,255,255,0.16);
    color: #f8fafc;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    box-shadow: none;
    transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
    animation: ai-todo-add-float 1.9s ease-in-out infinite;
}

.ai-todo-section-add-btn:hover {
    background: rgba(255,255,255,0.24);
    color: #ffffff;
    transform: translateY(-1px) scale(1.06);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.16);
}

.ai-todo-section-add-btn:active {
    transform: scale(0.96);
}

.ai-todo-item {
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    box-shadow: none;
    transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
    cursor: grab;
}

.ai-todo-item:hover,
.ai-todo-item:focus-within {
    border-color: rgba(203, 213, 225, 0.9);
    background: rgba(255,255,255,0.86);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.ai-todo-item.is-selected {
    border-color: rgba(37, 99, 235, 0.36);
    background: rgba(239, 246, 255, 0.72);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
}

.ai-todo-item.is-done {
    opacity: 0.72;
}

.ai-todo-item.is-note {
    background: transparent;
}

.ai-todo-item.is-high-priority {
    border-color: transparent;
    background: rgba(254,242,242,0.36);
    box-shadow: none;
}

.ai-todo-item.is-high-priority:hover,
.ai-todo-item.is-high-priority:focus-within {
    border-color: rgba(248, 113, 113, 0.38);
    background: rgba(255,245,245,0.88);
    box-shadow: 0 8px 18px rgba(239, 68, 68, 0.06);
}

.ai-todo-item.is-dragging {
    opacity: 0.68;
    transform: scale(0.985);
    box-shadow: 0 18px 32px rgba(37, 99, 235, 0.14);
}

.ai-todo-item.is-drop-before {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 0 2px rgba(147, 197, 253, 0.4);
}

.ai-todo-item-header {
    margin-bottom: 0;
    flex-wrap: nowrap;
    align-items: center;
}

.ai-todo-item-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.ai-todo-item-title-wrap {
    min-width: 0;
    flex: 1;
}

.ai-todo-item-side-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

.ai-todo-item-source-badges {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    max-width: min(116px, 28vw);
    min-width: 0;
    overflow: hidden;
    flex: 0 1 auto;
}

.ai-todo-item-source-badges .ai-todo-badge {
    min-height: 22px;
    max-width: 100%;
    padding: 2px 8px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-todo-item-date-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(239, 246, 255, 0.92);
    border: 1px solid rgba(191, 219, 254, 0.9);
    color: #2563eb;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.ai-todo-drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    min-width: 24px;
    height: 24px;
    min-height: 24px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid rgba(203, 213, 225, 0.9);
    background: rgba(248, 250, 252, 0.96);
    color: #64748b;
    line-height: 1;
    cursor: grab;
    box-shadow: none;
}

.ai-todo-drag-grip {
    display: block;
    width: 10px;
    height: 14px;
    opacity: 0.88;
    background-image:
        radial-gradient(circle, currentColor 1.2px, transparent 1.3px),
        radial-gradient(circle, currentColor 1.2px, transparent 1.3px);
    background-size: 4px 4px, 4px 4px;
    background-position: 0 0, 6px 0;
    background-repeat: repeat-y;
}

.ai-todo-drag-handle:hover {
    background: rgba(239, 246, 255, 0.98);
    color: #2563eb;
}

label.ai-todo-checkbox {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 2px 0 0;
    padding: 0;
    flex: 0 0 auto;
    line-height: 0;
    cursor: pointer;
}

input.ai-todo-checkbox,
.ai-todo-checkbox input[type="checkbox"] {
    -webkit-appearance: checkbox;
    appearance: auto;
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    flex: 0 0 16px;
    cursor: pointer;
    accent-color: auto;
    box-shadow: none;
    transition: none;
}

input.ai-todo-checkbox:focus-visible,
.ai-todo-checkbox input[type="checkbox"]:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
}

.ai-todo-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    min-width: 22px;
    height: 22px;
    min-height: 22px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(100, 116, 139, 0);
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    box-shadow: none;
    cursor: pointer;
    transition: color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.ai-todo-item:hover .ai-todo-delete-btn,
.ai-todo-item:focus-within .ai-todo-delete-btn {
    color: rgba(100, 116, 139, 0.45);
}

.ai-todo-delete-btn:hover {
    background: rgba(254, 242, 242, 0.94);
    color: #dc2626;
    transform: scale(1.04);
}

.ai-todo-item-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
}

.ai-todo-inline-mention {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 1px 7px;
    margin: 0 2px 1px 0;
    border-radius: 999px;
    border: 1px solid rgba(203, 213, 225, 0.8);
    background: rgba(241, 245, 249, 0.9);
    color: #94a3b8;
    font-size: inherit;
    font-weight: 500;
    line-height: 1.25;
    vertical-align: baseline;
    box-shadow: none;
}

.ai-todo-card .search-hint {
    display: none;
}

.ai-todo-item.is-done .ai-todo-item-title {
    text-decoration: line-through;
    color: #64748b;
}

.ai-todo-badge,
.ai-todo-mention,
.ai-notion-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.ai-todo-badge.is-high {
    background: rgba(254, 226, 226, 0.92);
    color: #b91c1c;
}

.ai-todo-badge.is-medium {
    background: rgba(219, 234, 254, 0.94);
    color: #1d4ed8;
}

.ai-todo-badge.is-low {
    background: rgba(220, 252, 231, 0.92);
    color: #166534;
}

.ai-todo-badge.is-status {
    background: rgba(241, 245, 249, 0.96);
    color: #475569;
}

.ai-todo-badge.is-archived {
    background: rgba(226, 232, 240, 0.96);
    color: #334155;
}

.ai-todo-mention {
    border: 1px solid rgba(203, 213, 225, 0.8);
    background: rgba(241, 245, 249, 0.9);
    color: #94a3b8;
    font-size: inherit;
    font-weight: 500;
    text-decoration: none;
}

.ai-todo-mention.is-unmatched {
    background: rgba(254, 242, 242, 0.96);
    border-color: rgba(252, 165, 165, 0.9);
    color: #b91c1c;
}

.ai-todo-mention.is-ambiguous {
    background: rgba(254, 249, 195, 0.96);
    border-color: rgba(253, 224, 71, 0.88);
    color: #92400e;
}

.ai-todo-mention:hover {
    filter: brightness(0.97);
}

.ai-todo-item-desc,
.ai-todo-detail-empty,
.ai-todo-history-empty {
    margin: 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

.ai-todo-item-footer {
    margin-top: 8px;
    padding-top: 7px;
    border-top: 1px solid rgba(226, 232, 240, 0.92);
}

.ai-todo-item-meta,
.ai-notion-sync-status,
.ai-todo-history-time {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.ai-todo-detail {
    display: grid;
    gap: 14px;
}

.ai-todo-history-export,
.ai-todo-history-export-grid,
.ai-todo-history-summary-grid {
    display: grid;
    gap: 14px;
}

.ai-todo-history-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.ai-todo-history-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ai-todo-history-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ai-todo-history-summary-card {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    background: rgba(255,255,255,0.94);
    display: grid;
    gap: 4px;
}

.ai-todo-history-summary-card span {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.ai-todo-history-summary-card strong {
    color: #0f172a;
    font-size: 22px;
    font-weight: 800;
}

.ai-todo-export-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ai-todo-history-export-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-todo-history-item,
.ai-todo-mention-candidate {
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255,255,255,0.92);
}

.ai-todo-history-item.is-selected {
    border-color: rgba(37, 99, 235, 0.36);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.08);
}

.ai-todo-history-item strong,
.ai-todo-mention-candidate strong {
    color: #0f172a;
}

.ai-todo-history-desc,
.ai-todo-mention-candidate p {
    margin: 6px 0 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.5;
}

.ai-notion-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ai-notion-status-pill.is-idle {
    background: rgba(241, 245, 249, 0.96);
    color: #475569;
}

.ai-notion-status-pill.is-synced {
    background: rgba(220, 252, 231, 0.92);
    color: #166534;
}

.ai-notion-status-pill.is-conflict,
.ai-notion-status-pill.is-error {
    background: rgba(254, 226, 226, 0.92);
    color: #b91c1c;
}

.ai-recommendation-action-btn {
    margin-top: 12px;
}

.ai-todo-placement-hint {
    margin: -4px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(239, 246, 255, 0.72);
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
}

.ai-todo-detail-section {
    display: grid;
    gap: 10px;
    padding-top: 4px;
    border-top: 1px solid rgba(226, 232, 240, 0.86);
}

.ai-todo-detail-textarea {
    min-height: 100px;
    resize: vertical;
}

.ai-todo-modal-content {
    width: min(980px, 96vw);
    max-height: 92vh;
}

.ai-todo-export-modal-content {
    width: min(760px, 94vw);
}

.ai-todo-mention-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 40;
    display: grid;
    gap: 6px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(255,255,255,0.98);
    border: 1px solid rgba(226, 232, 240, 0.96);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
}

.ai-todo-mention-suggestion-btn {
    display: grid;
    justify-items: start;
    gap: 3px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    color: #0f172a;
    background: rgba(248,250,252,0.96);
    box-shadow: none;
    text-align: left;
}

.ai-todo-mention-suggestion-btn:hover {
    background: rgba(239,246,255,0.98);
}

.ai-todo-mention-suggestion-meta {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.ai-todo-history-section {
    gap: 0;
}

.ai-todo-history-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
    font-size: 18px;
    font-weight: 900;
    color: #111827;
}

.ai-todo-history-summary::-webkit-details-marker {
    display: none;
}

.ai-todo-history-summary::after {
    content: "펼치기";
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(239, 246, 255, 0.94);
    color: #2563eb;
    font-size: 12px;
    font-weight: 900;
}

.ai-todo-history-section[open] .ai-todo-history-summary {
    margin-bottom: 10px;
}

.ai-todo-history-section[open] .ai-todo-history-summary::after {
    content: "접기";
}

.ai-todo-history-count {
    margin-left: auto;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

/* === 2026-06-07 dark theme === */
.field-label,
.ai-todo-search-result-meta,
.ai-todo-search-empty,
.ai-todo-item-meta,
.ai-todo-item-desc,
.ai-todo-history-count {
    color: var(--color-text-secondary);
}

.ai-todo-input,
.ai-todo-date-input,
.ai-todo-search-field {
    background: var(--color-surface-2);
    color: var(--color-text-primary);
    border-color: var(--color-border-strong);
}

.ai-todo-search-results {
    background: var(--color-surface);
    border-color: var(--color-border);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.3);
}

.ai-todo-search-result-btn,
.ai-todo-item {
    background: var(--color-surface);
    color: var(--color-text-primary);
    border-color: var(--color-border);
}

.ai-todo-search-result-btn:hover,
.ai-todo-item:hover,
.ai-todo-item:focus-within {
    background: var(--color-surface-hover);
    border-color: var(--color-border-strong);
}

.ai-todo-item.is-note {
    background: var(--color-surface);
}

.ai-todo-item.is-selected {
    background: var(--color-accent-muted);
    border-color: rgba(67, 97, 238, 0.5);
}

.ai-todo-item.is-high-priority {
    background: var(--color-danger-bg);
    border-color: rgba(248, 113, 113, 0.24);
}

.ai-todo-item.is-high-priority:hover,
.ai-todo-item.is-high-priority:focus-within {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(248, 113, 113, 0.42);
}

.ai-todo-section-add-btn {
    background: var(--color-surface-2);
    color: var(--color-text-secondary);
    border-color: var(--color-border-strong);
}

.ai-todo-section-add-btn:hover {
    background: var(--color-surface-hover);
    color: var(--color-text-primary);
}

.ai-todo-item-title,
.ai-todo-history-summary {
    color: var(--color-text-primary);
}

.ai-todo-item-date-badge,
.ai-todo-history-summary::after {
    background: var(--color-info-bg);
    border-color: rgba(96, 165, 250, 0.3);
    color: var(--color-info-text);
}

.ai-todo-drag-handle {
    background: var(--color-surface-2);
    border-color: var(--color-border-strong);
    color: var(--color-text-secondary);
}

.ai-todo-drag-handle:hover {
    background: var(--color-surface-hover);
    color: var(--color-info-text);
}
