/*
 * Pipali Styles - Home Page
 * Includes: empty state, task gallery, task cards
 */

/* Empty State */
.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.empty-icon {
    color: var(--color-text-muted);
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-state h2 {
    font-size: 24px;
    font-weight: 500;
    color: var(--color-text);
    margin: 0 0 8px 0;
    letter-spacing: -0.01em;
}

.empty-state p {
    font-size: 14px;
    color: var(--color-text-muted);
    margin: 0;
}

/* Ribbon Animation (Three.js canvas) */
.ribbon-animation {
    margin-bottom: 8px;
    line-height: 0;
}

.ribbon-animation canvas {
    display: block;
    border-radius: var(--radius-md);
}

/* Task Gallery (Home Page) */
.task-gallery {
    padding: 48px 24px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.task-gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.task-gallery-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.task-count {
    font-size: 13px;
    color: var(--color-text-muted);
    background: var(--color-bg-muted);
    padding: 4px 10px;
    border-radius: var(--radius-md);
}

.task-gallery-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-gallery-clear {
    font-size: 13px;
    color: var(--color-text-muted);
    background: transparent;
    border: 1px solid var(--color-border);
    padding: 4px 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.task-gallery-clear:hover {
    color: var(--color-text);
    border-color: var(--color-text-muted);
    background: var(--color-bg-muted);
}

.task-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Individual Task Card */
.task-card {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.task-card:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.task-card.needs-input {
    border-left: 3px solid var(--color-warning);
}

.task-card.stopped {
    border-left: 3px solid var(--color-warning);
}

.task-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-status-icon.running {
    color: var(--color-info);
    animation: spin 1s linear infinite;
}

.task-status-icon.needs-input {
    color: var(--color-warning);
}

.task-status-icon.completed {
    color: var(--color-success);
}

.task-status-icon.stopped {
    color: var(--color-warning);
}

.task-status-text {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-status-text.running {
    color: var(--color-info);
}

.task-status-text.needs-input {
    color: var(--color-warning);
}

.task-status-text.completed {
    color: var(--color-success);
}

.task-status-text.stopped {
    color: var(--color-warning);
}

.task-icon-trail {
    margin-left: auto;
}

.task-card-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-card-reasoning {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.5;
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--color-border-subtle);
}

/* Pinned task card */
.task-status-icon.pinned {
    color: var(--color-text-muted);
}

.task-status-text.pinned {
    color: var(--color-text-muted);
}

.task-pin-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--color-text-muted);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    transition: color var(--transition), background var(--transition);
    opacity: 0;
}

.task-card:hover .task-pin-btn {
    opacity: 1;
}

.task-pin-btn:hover {
    color: var(--color-text);
    background: var(--color-bg-muted);
}

.task-pin-btn .pin-off-icon {
    display: none;
}

.task-pin-btn.active {
    opacity: 1;
    color: var(--color-accent);
}

.task-pin-btn.active:hover .pin-icon {
    display: none;
}

.task-pin-btn.active:hover .pin-off-icon {
    display: block;
}
