/* Data Hub specific styles moved from inline template styles */

/* Dropdown minimum width used for client and other dropdowns */
.min-width-300 { min-width: 300px !important; }

/* Platform summary card sizing */
.platform-card { min-width: 220px; max-width: 320px; background: #f1f1f1; }
.platform-card:hover { background: #e1e1e1; transition: background 0.3s ease; cursor: pointer; }
/* Platform logo circle */
.platform-logo { width: 50px; height: 50px; color: #fff; font-weight: 700; }
.platform-logo.d-flex { display: flex; align-items: center; justify-content: center; }

/* Per-platform colors */
.platform-logo.google { background: #4285F4; }
.platform-logo.meta { background: #1877F2; }
.platform-logo.microsoft { background: #f25022; }
.platform-logo.tiktok { background: #000; }

/* Spend by Platform progress bars */
.spend-pie-chart { height: 220px; position: relative; }

/* Campaign spend trend chart */
.spend-trend-card {
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
    border-radius: 0;
    border: 1px solid #e5e7eb;
}

.spend-trend-chart {
    position: relative;
    min-height: 260px;
    height: 260px;
}

.trend-summary {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.trend-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 5;
    font-size: 0.85rem;
    font-weight: 700;
}

.trend-up {
    color: #198754;
    background: rgba(25, 135, 84, 0.12);
}

.trend-down {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.12);
}

.trend-flat {
    color: #6c757d;
    background: rgba(108, 117, 125, 0.12);
}

/* Small utility width classes for placeholder percentages */
.w-60 { width: 60% !important; }
.w-25 { width: 25% !important; }
.w-10 { width: 10% !important; }
.w-5  { width: 5%  !important; }

/* Ensure the cards wrap nicely */
.platform-card .h5 { font-size: 1.25rem; }

@media (max-width: 576px) {
    .data-hub-overview-title,
    .data-hub-overview-filters,
    .data-hub-overview-filters .client-wrraper,
    .data-hub-overview-filters .d-flex,
    .data-hub-overview-spend,
    .data-hub-overview-spend .card {
        align-items: center !important;
        justify-content: center !important;
        text-align: center;
    }

    .data-hub-overview-platforms {
        justify-content: center;
        text-align: center;
    }

    .data-hub-overview-platforms > [class*="col-"] {
        display: flex;
        justify-content: center;
    }

    .data-hub-overview-platforms .platform-link,
    .data-hub-overview-platforms .platform-card {
        width: 100%;
        max-width: 320px;
    }

    .data-hub-overview-platforms .platform-card > .d-flex {
        justify-content: center;
        text-align: left;
    }

    .data-hub-overview-spend > [class*="col-"] {
        margin-left: auto;
        margin-right: auto;
    }

    .data-hub-overview-spend .card > .d-flex,
    .data-hub-overview-spend .row {
        justify-content: center !important;
    }

    .data-hub-overview-spend .card {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    #spend-legend-container {
        width: 100%;
        padding-right: 5px;
    }

    #spend-legend-container .spend-legend-item {
        display: grid !important;
        grid-template-columns: minmax(104px, 1fr) minmax(108px, auto);
        gap: 8px;
        padding-left: 8px;
        width: 100%;
    }

    #spend-legend-container .spend-legend-label {
        min-width: 0;
    }

    #spend-legend-container .spend-legend-label .platform-dots {
        flex: 0 0 13px;
        margin-right: 5px !important;
    }

    #spend-legend-container .spend-legend-label .text-secondary {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    #spend-legend-container .spend-legend-value {
        display: flex;
        flex-wrap: wrap;
        gap: 2px 6px;
        justify-content: flex-end;
        text-align: left;
    }

    #spend-legend-container .spend-legend-value .ms-2 {
        margin-left: 0 !important;
    }
}
