/**
 * Down Detector & Service Health Radar Styling
 * UG SOC INTEL - Cyber Threat Intelligence Platform
 */

/* Grid of Service Cards */
.dd-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    width: 100%;
}

@media (min-width: 1400px) {
    .dd-services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .dd-services-grid {
        grid-template-columns: 1fr;
    }
}

/* Service Card Glassmorphism */
.dd-service-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(20, 32, 54, 0.92));
    border-radius: 12px;
    padding: 18px;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dd-service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 185, 129, 0.15);
}

/* Vendor Icon Wrapper */
.dd-vendor-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(2, 6, 23, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.dd-service-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
}

.dd-service-vendor {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dd-link-ext {
    color: #64748b;
    font-size: 12px;
    transition: color 0.15s;
    padding: 4px;
}

.dd-link-ext:hover {
    color: #38bdf8;
}

/* Status Badges */
.dd-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

.dd-status-operational {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.dd-status-degraded {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.dd-status-outage {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.5);
    animation: dd-pulse-red 1.5s infinite;
}

@keyframes dd-pulse-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 12px 2px rgba(239, 68, 68, 0.6); }
}

/* Monitored Component Tags */
.dd-component-tag {
    font-size: 10px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Sparkline Visualization */
.dd-sparkline-wrap {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 28px;
    padding: 4px;
    background: rgba(2, 6, 23, 0.5);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.dd-sparkline-bar {
    flex: 1;
    min-height: 4px;
    border-radius: 2px;
    transition: height 0.3s ease;
}

/* Card Action Footer */
.dd-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    gap: 8px;
}

.dd-probe-btn {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dd-probe-btn:hover {
    background: #10b981;
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
}

.dd-subtle-btn {
    color: #94a3b8;
    font-size: 11px;
    text-decoration: none;
    transition: color 0.15s;
}

.dd-subtle-btn:hover {
    color: #38bdf8;
    text-decoration: underline;
}

/* Filter Pills */
.dd-filter-pill {
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.dd-filter-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.15);
}

.dd-filter-pill.active {
    background: #10b981 !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

/* Countdown Pill */
.dd-countdown-pill {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #cbd5e1;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 7px;
}

/* Header Live Badge */
.dd-live-badge {
    font-size: 10px;
    font-weight: 800;
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    letter-spacing: 0.6px;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
