/* build_pipeline.css - Premium styling for Build & Deploy Pipeline tab */

.build-pipeline-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
    background: var(--bg-primary);
    min-height: 100%;
}

.build-services-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.services-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.service-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

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

.service-status-dot {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.service-status-dot.green {
    background-color: var(--status-success);
    box-shadow: 0 0 8px var(--status-success);
}

.service-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
    flex-grow: 1;
}

.service-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    padding-right: 20px;
}

.service-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.service-cmd {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    background: var(--bg-secondary);
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    color: var(--accent-color);
    margin-top: 10px;
    word-break: break-all;
}

.build-btn {
    background: linear-gradient(135deg, var(--accent-color), #2563eb);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.build-btn:hover {
    opacity: 0.95;
    transform: scale(1.02);
}

.build-btn:active {
    transform: scale(0.98);
}

/* Console Styling */
.build-console-panel {
    background: #0d0e12;
    border: 1px solid #1f222e;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.console-header {
    background: #161822;
    padding: 14px 20px;
    border-bottom: 1px solid #1f222e;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.console-title {
    color: #e3e6ed;
    font-weight: 600;
    font-size: 0.95rem;
}

.console-status-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    background: #252838;
    color: #a0a6b5;
}

.console-status-badge.running {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    animation: pulse 1.5s infinite;
}

.console-status-badge.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.console-status-badge.failed {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.console-body {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
    background: #090a0f;
}

.console-body pre {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
    color: #a7b5d1;
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Scrollbar Customization for Terminal */
.console-body::-webkit-scrollbar {
    width: 8px;
}
.console-body::-webkit-scrollbar-track {
    background: #090a0f;
}
.console-body::-webkit-scrollbar-thumb {
    background: #1f222e;
    border-radius: 4px;
}
.console-body::-webkit-scrollbar-thumb:hover {
    background: #2b3042;
}

/* Build History Table */
.build-history-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.build-history-table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-primary);
}

.build-history-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.build-history-table th {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
}

.build-history-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.build-history-table tr:last-child td {
    border-bottom: none;
}

.build-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.build-status-badge.status-running {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.build-status-badge.status-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.build-status-badge.status-failed {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.view-log-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-log-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
