/* =================================== */
/* TRELLO BOARD STYLES */
/* =================================== */

.trello-board {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    height: calc(100vh - 220px);
    min-height: 400px;
}

.trello-column {
    flex: 1 1 0;
    min-width: 230px;
    max-width: 400px;
    background-color: rgb(var(--muted) / 0.03);
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    border: 1px solid rgb(var(--border) / 0.5);
}

.column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgb(var(--border));
}

.column-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: rgb(var(--foreground));
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.column-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.column-count {
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

/* Status-specific column count colors */
.column-count-pending {
    background-color: rgb(var(--muted));
    color: rgb(var(--muted-foreground));
}

.column-count-running {
    background-color: rgb(var(--warning));
    color: rgb(var(--warning-foreground));
}

.column-count-completed {
    background-color: rgb(var(--success));
    color: rgb(var(--success-foreground));
}

.column-count-failed {
    background-color: rgb(var(--destructive));
    color: rgb(var(--destructive-foreground));
}

.column-count-cancelled {
    /* Was a literal violet with a literal white label — 4.23:1, and neither
       half knew about the theme. The other four counts in this row are a
       vivid fill plus its -foreground; violet has no such token, so it takes
       the shared solid-fill ink (4.96:1). */
    background-color: rgb(var(--tint-violet));
    color: rgb(var(--tint-violet-foreground));
}

.column-header .view-all-link {
    color: rgb(var(--primary));
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.column-header .view-all-link:hover {
    opacity: 1;
}

.column-cards {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 0;
}

/* Subtle scrollbar for columns */
.column-cards::-webkit-scrollbar {
    width: 6px;
}

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

.column-cards::-webkit-scrollbar-thumb {
    background: rgb(var(--muted) / 0.3);
    border-radius: 3px;
}

.column-cards::-webkit-scrollbar-thumb:hover {
    background: rgb(var(--muted) / 0.5);
}

.execution-card {
    background-color: rgb(var(--card));
    border: 1px solid rgb(var(--border) / 0.6);
    border-radius: 10px;
    padding: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.execution-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: rgb(var(--primary) / 0.4);
    background-color: rgb(var(--card));
}

.execution-card .card-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: rgb(var(--foreground));
    line-height: 1.4;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.execution-card .card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 0;
}

.execution-card .card-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 100px;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-weight: 500;
}

.execution-card .card-tag.department {
    background-color: rgb(var(--muted) / 0.5);
    color: rgb(var(--muted-foreground));
}

.execution-card .card-tag.priority-urgent {
    background-color: rgb(var(--tint-red) / 0.15);
    color: rgb(var(--tint-red-ink));
}

.execution-card .card-tag.priority-high {
    background-color: rgb(var(--tint-orange) / 0.15);
    color: rgb(var(--tint-orange-ink));
}

.execution-card .card-tag.priority-medium {
    background-color: rgb(var(--tint-blue) / 0.15);
    color: rgb(var(--tint-blue-ink));
}

.execution-card .card-tag.priority-low {
    background-color: rgb(var(--tint-green) / 0.15);
    color: rgb(var(--tint-green-ink));
}

.execution-card .card-tag.type-tag {
    background-color: rgb(var(--primary) / 0.1);
    color: rgb(var(--primary-text));
}

.execution-card .card-tag.source-implementation {
    background-color: rgb(var(--tint-violet) / 0.15);
    color: rgb(var(--tint-violet-ink));
}

.execution-card .card-tag.status-paused {
    background-color: rgb(var(--tint-amber) / 0.15);
    color: rgb(var(--tint-amber-ink));
}

.execution-card .card-tag.status-on_hold {
    background-color: rgb(var(--tint-amber) / 0.15);
    color: rgb(var(--tint-amber-ink));
}

.execution-card .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid rgb(var(--border) / 0.5);
    font-size: 0.75rem;
    color: rgb(var(--muted-foreground));
}

.execution-card .card-footer i {
    margin-right: 0.2rem;
    font-size: 0.7rem;
}

.execution-card.running {
    border-left: 4px solid rgb(var(--warning));
    background-color: rgb(var(--warning) / 0.05);
}

.execution-card.running::before {
    content: '';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 8px;
    height: 8px;
    background-color: rgb(var(--warning));
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.execution-card.paused {
    border-left: 4px solid #f59e0b;
    background-color: rgba(245, 158, 11, 0.05);
}

.execution-card {
    position: relative;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.card-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: rgb(var(--foreground));
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.card-tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.375rem;
    background-color: rgb(var(--secondary));
    color: rgb(var(--secondary-foreground));
}

.card-tag.department {
    background-color: rgb(var(--primary) / 0.1);
    color: rgb(var(--primary-text));
}

.card-tag.supervisor {
    background-color: rgb(var(--info) / 0.1);
    color: rgb(var(--info-text));
}

.card-footer {
    display: flex;
    justify-content: between;
    align-items: center;
    font-size: 0.8rem;
    color: rgb(var(--muted-foreground));
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgb(var(--border));
}

.card-created-by {
    flex: 1;
}

.card-time {
    font-size: 0.75rem;
}


.empty-column {
    text-align: center;
    padding: 2rem 1rem;
    color: rgb(var(--muted-foreground));
    font-style: italic;
}

.spinner-overlay {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 16px;
    height: 16px;
    border: 2px solid rgb(var(--muted));
    border-top: 2px solid rgb(var(--primary));
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
