/* =================================== */
/* TASK DETAIL MODAL STYLES */
/* =================================== */

.execution-detail-modal .modal-dialog {
    max-width: 900px;
    max-height: 90vh;
    display: flex;
}

.execution-detail-modal .modal-content {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.execution-detail-modal .modal-body {
    overflow-y: auto;
    max-height: calc(90vh - 200px); /* Account for header and padding */
    flex: 1 1 auto;
}

#taskModalBody {
    overflow-y: auto;
    padding-bottom: 20px;
}

/* Scrollbar styling for modal */
.execution-detail-modal .modal-body::-webkit-scrollbar,
#taskModalBody::-webkit-scrollbar {
    width: 8px;
}

.execution-detail-modal .modal-body::-webkit-scrollbar-track,
#taskModalBody::-webkit-scrollbar-track {
    background: rgb(var(--muted) / 0.1);
    border-radius: 4px;
}

.execution-detail-modal .modal-body::-webkit-scrollbar-thumb,
#taskModalBody::-webkit-scrollbar-thumb {
    background: rgb(var(--muted-foreground) / 0.3);
    border-radius: 4px;
}

.execution-detail-modal .modal-body::-webkit-scrollbar-thumb:hover,
#taskModalBody::-webkit-scrollbar-thumb:hover {
    background: rgb(var(--muted-foreground) / 0.5);
}

.modal-header-content {
    width: 100%;
}

.modal-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    width: 100%;
}

.modal-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.execution-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: rgb(var(--foreground));
    margin: 0;
}

.execution-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgb(var(--border));
}

.execution-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.execution-status-badge.pending {
    background-color: rgb(var(--muted));
    color: rgb(var(--muted-foreground));
}

.execution-status-badge.in_progress {
    background-color: rgb(var(--warning) / 0.1);
    color: rgb(var(--warning-text));
}

.execution-status-badge.completed {
    background-color: rgb(var(--success) / 0.1);
    color: rgb(var(--success-text));
}

.execution-status-badge.failed {
    background-color: rgb(var(--destructive) / 0.1);
    color: rgb(var(--destructive-text));
}


.execution-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meta-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgb(var(--muted-foreground));
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-value {
    color: rgb(var(--foreground));
}

.execution-content-section {
    margin-bottom: 1.5rem;
}

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

.section-content {
    background-color: rgb(var(--muted) / 0.3);
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid rgb(var(--border));
}

/* Raw "Execution Information" blob. Was an inline
   `background: #f5f5f5` — a fixed near-white panel that stayed white in
   dark mode with `rgb(var(--foreground))` text on top of it, i.e. white
   on white. Themed surface + explicit foreground so it reads in both. */
.execution-raw-info {
    white-space: pre-wrap;
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
    font-size: 0.85rem;
    color: rgb(var(--foreground));
    background-color: rgb(var(--muted) / 0.5);
    border: 1px solid rgb(var(--border));
    padding: 0.9rem;
    border-radius: 0.35rem;
    max-height: 400px;
    overflow: auto;
}

.requirements-list,
.phases-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.requirements-list li,
.phases-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgb(var(--border));
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.requirements-list li:last-child,
.phases-list li:last-child {
    border-bottom: none;
}

.requirements-list li::before {
    content: "✓";
    color: rgb(var(--success-text));
    font-weight: 600;
}

.phases-list li::before {
    content: "▸";
    color: rgb(var(--primary));
    font-weight: 600;
}

.cost-tracking {
    background-color: rgb(var(--card));
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid rgb(var(--border));
    margin-top: 1rem;
}

.cost-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.cost-item {
    text-align: center;
    padding: 0.75rem;
    background-color: rgb(var(--muted) / 0.3);
    border-radius: 0.375rem;
}

.cost-amount {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgb(var(--primary));
}

.cost-label {
    font-size: 0.8rem;
    color: rgb(var(--muted-foreground));
    margin-top: 0.25rem;
}
