/* ============================================
   Statuspage Customization - Final
   ============================================ */

/* ============================================
   HIDE BARS UNTIL JS CUSTOMIZES THEM
   Only hides the inner bar container
============================================ */
.component-inner-container {
    opacity: 0 !important;
    transition: opacity 0.3s ease-in-out;
}

.component-inner-container.customized {
    opacity: 1 !important;
}

/* HIDE HEADER */
.page-component-uptime-header,
.component-uptime-header,
.uptime-header {
    display: none !important;
}

/* HIDE UPTIME PERCENTAGE */
.uptime-percent,
.component-uptime-text,
.component-extra-info {
    display: none !important;
}

/* HIDE LEGEND ROW */
.legend {
    display: none !important;
}

/* HIDE SPACER LINES */
.spacer {
    display: none !important;
}

/* HIDE DIVIDERS */
.availability-time-line-legend,
.component-uptime,
.uptime-tooltip-content,
.metric .divider,
.metric hr,
.component-inner-container hr,
.component-container hr,
hr.component-separator,
.metric:before,
.metric:after {
    display: none !important;
}

/* MAKE SVG FULL WIDTH */
svg.availability-time-line-graphic,
svg[id^="uptime-component"] {
    width: 100% !important;
    display: block !important;
    max-width: 100% !important;
}

/* ENABLE POINTER EVENTS ON BARS */
svg.availability-time-line-graphic rect,
svg[id^="uptime-component"] rect {
    pointer-events: all;
}

/* CUSTOM TOOLTIP */
#uptime-custom-tooltip {
    position: absolute;
    background: #333;
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 12px;
    pointer-events: none;
    z-index: 9999;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    line-height: 1.6;
    text-align: left;
    white-space: nowrap;
}

#uptime-custom-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
}

/* Status indicator styles inside tooltip */
#uptime-custom-tooltip .tooltip-status {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

#uptime-custom-tooltip .tooltip-status.green {
    background-color: #1e8542;
}

#uptime-custom-tooltip .tooltip-status.red {
    background-color: #de2f1b;
}

#uptime-custom-tooltip .tooltip-status.amber {
    background-color: #aaaf20;
}

/* HIDE ALL DEFAULT STATUSPAGE TOOLTIPS */
.tooltip-base,
.tooltip-base-content,
.component-delta-tooltip,
.availability-time-line-tooltip,
.tippy-box,
.tippy-content,
.popover,
.popover-content {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* HIDE "RELATED" SECTIONS */
.related-events-container,
.related-incidents,
.related-events,
[class*="related"] {
    display: none !important;
}

/* REMOVE "NO INCIDENTS REPORTED" */
.no-incidents,
.incident-title.no-incidents,
body.history-page .unresolved-incidents {
    display: none !important;
}

/* HIDE EMPTY HISTORY DAYS */
body.history-page .day-group:has(.no-incidents),
body.history-page .components-uptime-container:has(.no-incidents) {
    display: none !important;
}

/* PREVENT MOBILE OVERFLOW */
.component-inner-container,
.availability-time-line-graphic {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

/* HIDE "VIEW HISTORICAL UPTIME" LINK */
a[href*="uptime"],
a[href*="history"],
.uptime-link,
.historical-uptime-link,
p:has(a[href*="uptime"]),
.text-small:has(a[href*="uptime"]),
.page-footer a[href*="uptime"],
.components-section a[href*="uptime"],
.component-container a[href*="uptime"] {
    display: none !important;
}

/* "UPTIME OVER THE PAST 14 DAYS" → RIGHT CORNER */
.components-uptime-link,
.component-uptime-header {
    text-align: right !important;
    font-size: 11px !important;
    color: #999 !important;
    margin: 0 10px 5px 0 !important;
    padding: 0 !important;
    font-weight: normal !important;
}

/* ============================================
   MOBILE FIXES
============================================ */
@media only screen and (max-width: 768px) {

    /* Force bars to full width and center */
    svg.availability-time-line-graphic,
    svg[id^="uptime-component"] {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        margin: 0 auto !important;
    }

    .component-inner-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }

    .component-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }
}
/* Keep the normal page content after the status banner */
body > div.layout-content.status.status-index.premium > div.container {
  display: flex !important;
  flex-direction: column !important;
}

/* Put all normal sections after the banner by default */
body > div.layout-content.status.status-index.premium > div.container > * {
  order: 3 !important;
}

/* About This Site and UTC text */
body > div.layout-content.status.status-index.premium > div.container > div.text-section {
  order: 1 !important;
}

/* Overall status banner */
body > div.layout-content.status.status-index.premium > div.container > div.page-status {
  order: 2 !important;
  margin-top: 24px !important;
}
/* Remove the default About This Site heading */
body > div.layout-content.status.status-index.premium div.text-section h1,
body > div.layout-content.status.status-index.premium div.text-section h2 {
  display: none !important;
}
/* Reduce the large vertical gaps */
.text-section {
  margin-top: -50px !important;
  margin-bottom: 0 !important;
}

.page-status {
  margin-top: 25px !important;
  margin-bottom: 25px !important;
}

.components-section {
  margin-top: 0 !important;
}