/* Dashboard2 - Flow-oriented message pipeline visualization */

/* Dashboard Container - 96% width for all screen sizes */
.dashboard-container {
    width: 96%;
    margin: 0 auto;
    max-width: 100%;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

@media (max-width: 768px) {
    .dashboard-container {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Flow Container - 3 column layout */
.flow-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.5rem;
    align-items: center;
    min-height: 80px;
    overflow: hidden;
}

/* Column Styling */
.flow-column {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 0;
    overflow: hidden;
}

.flow-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
    margin-bottom: 0.125rem;
}

/* Inbound Column - Left aligned */
.flow-inbound {
    align-items: flex-end;
}

/* Outbound Column - Right aligned */
.flow-outbound {
    align-items: flex-start;
}

/* Queue Column - Center aligned */
.flow-queues {
    align-items: center;
    justify-content: center;
}

/* Endpoint Cards */
.flow-endpoint {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.375rem;
    background: var(--bs-light);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.25rem;
    transition: all 0.2s;
    max-width: 120px;
    width: 100%;
    min-height: 28px;
}

.flow-endpoint:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.flow-endpoint i {
    font-size: 0.875rem;
    flex-shrink: 0;
}

.endpoint-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.endpoint-name {
    font-size: 0.75rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.endpoint-queue {
    font-size: 0.65rem;
    color: var(--bs-warning);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Queue Pipeline - Horizontal flow */
.queue-pipeline {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
}

.queue-tier {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
}

.tier-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.7rem;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.tier-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tier-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.tier-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.tier-metric {
    text-align: center;
}

.metric-value {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1;
    color: var(--bs-body-color);
}

.metric-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    opacity: 0.6;
    margin-top: 0.125rem;
}

.queue-arrow {
    font-size: 1rem;
    opacity: 0.4;
    animation: flowPulse 2s ease-in-out infinite;
}

@keyframes flowPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* Card customization */
.card-header {
    background: var(--bs-light);
    border-bottom: 2px solid var(--bs-border-color);
    padding: 0.375rem 0.625rem;
}

.card-body {
    padding: 0.5rem;
    overflow: hidden;
}

/* Clickable connection cards */
.connection-card {
    cursor: pointer;
    transition: all 0.2s;
}

.connection-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

/* Connection Detail Modal Sections */
.connection-detail-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.connection-detail-section:last-child {
    border-bottom: none;
}

.connection-detail-section h6 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Detail Rows */
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.375rem 0;
    font-size: 0.9rem;
}

.detail-label {
    font-weight: 500;
    color: var(--bs-secondary);
}

.detail-value {
    font-weight: 400;
    color: var(--bs-body-color);
}

/* Endpoint Detail Cards */
.endpoint-detail-card {
    background: var(--bs-light);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    padding: 0.75rem;
    transition: all 0.2s;
}

.endpoint-detail-card:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Mobile: full width cards, larger endpoints */
    .flow-endpoint {
        max-width: 100%;
    }

    .flow-container {
        gap: 0.75rem;
    }

    .endpoint-name {
        font-size: 0.875rem;
    }

    .tier-badge {
        width: 32px;
        height: 32px;
        font-size: 0.7rem;
    }

    .metric-value {
        font-size: 1rem;
    }

    .queue-pipeline {
        gap: 0.375rem;
    }

    /* Mobile card styling */
    .card-header {
        padding: 0.5rem 0.75rem;
    }

    .card-body {
        padding: 0.75rem;
    }

    /* Mobile modal adjustments */
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-body {
        max-height: calc(100vh - 200px);
    }

    .endpoint-detail-card {
        padding: 0.5rem;
    }

    .detail-row {
        font-size: 0.85rem;
    }
}
