/* ================================================
   TRAVELING MAILBOX STATUS PAGE
   COMPLETE CUSTOM CSS
   Version: Status Pill Enhancement
   ================================================ */

:root {
  --tmb-navy: #17345B;
  --tmb-blue: #287CB8;
  --tmb-text: #263C56;
  --tmb-muted: #64748B;
  --tmb-border: #DFE8F2;
  --tmb-bg: #F7F9FC;
  --tmb-green: #14845A;
  --tmb-amber: #A96712;
  --tmb-red: #BD3844;
}

/* GLOBAL */

body {
  background: var(--tmb-bg) !important;
  color: var(--tmb-text) !important;
  font-family: -apple-system, BlinkMacSystemFont,
    "Segoe UI", Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

.layout-content {
  background: transparent !important;
}

.layout-content > .container {
  width: 92% !important;
  max-width: 1100px !important;
  margin: 0 auto !important;
  padding: 28px 0 45px !important;
}

.layout-content h1,
.layout-content h2,
.layout-content h3,
.layout-content h4 {
  color: var(--tmb-navy);
}

.layout-content a {
  color: var(--tmb-blue);
}

/* HEADER */

.tmb-header {
  background: var(--tmb-navy);
  color: #FFFFFF;
}

.tmb-header-inner {
  width: 92%;
  max-width: 1100px;
  margin: auto;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
}

.tmb-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none !important;
}

.tmb-brand-name {
  color: #FFFFFF !important;
  font-size: 21px;
  font-weight: 750;
}

.tmb-brand-tagline {
  color: #C3D8EA !important;
  font-size: 11px;
}

.tmb-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 19px;
}

.tmb-nav > a {
  color: #EAF3FF !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
}

.tmb-nav > a:hover {
  color: #FFFFFF !important;
}

.tmb-nav #show-updates-dropdown {
  background: #348BD0 !important;
  color: #FFFFFF !important;
  padding: 11px 17px !important;
  border: 0 !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

/* HERO */

.tmb-hero {
  background: linear-gradient(
    110deg, #EDF5FF, #F4F7FD 60%, #EFF2FA
  );
  border-bottom: 1px solid var(--tmb-border);
}

.tmb-hero-inner {
  width: 92%;
  max-width: 1100px;
  margin: auto;
  padding: 39px 0 43px;
}

.tmb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
  color: #28699F !important;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.4px;
}

.tmb-eyebrow-dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  flex-shrink: 0;
  background: #348BD0;
  border-radius: 50%;
  animation: tmb-pulse 2s ease-in-out infinite;
}

@keyframes tmb-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(52,139,208,.45);
  }
  50% {
    box-shadow: 0 0 0 9px rgba(52,139,208,0);
  }
}

.tmb-hero h1 {
  color: var(--tmb-navy) !important;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 750;
  line-height: 1.15;
  margin: 0 0 13px;
  letter-spacing: -1.1px;
}

.tmb-hero p {
  color: #526780 !important;
  font-size: 15px;
  line-height: 1.7;
  max-width: 690px;
  margin: 0;
}

.tmb-hero-links[hidden] {
  display: none !important;
}

.tmb-hero-links {
  margin-top: 22px;
}

.tmb-back-link {
  color: var(--tmb-blue) !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
}

/* NATIVE STATUSPAGE */

.page-status {
  border-radius: 12px !important;
  overflow: hidden;
  margin-bottom: 25px !important;
}

.unresolved-incidents {
  margin-bottom: 32px !important;
}

.unresolved-incidents .incident-container {
  border: 1px solid #EBD3A9 !important;
  border-radius: 13px !important;
  overflow: hidden;
  margin-bottom: 15px !important;
}

.unresolved-incidents .incident-body,
.unresolved-incidents .update-body,
.unresolved-incidents .updates {
  background: #FFFFFF !important;
  color: #334155 !important;
}

.unresolved-incidents .incident-body p,
.unresolved-incidents .update-body p,
.unresolved-incidents .updates p {
  color: #334155 !important;
  opacity: 1 !important;
  line-height: 1.75 !important;
}

.unresolved-incidents .incident-body a,
.unresolved-incidents .update-body a {
  color: var(--tmb-blue) !important;
}

/* CUSTOM OVERALL STATUS */

#tmb-dashboard {
  width: 100%;
  color: var(--tmb-text);
  margin-bottom: 32px;
}

.tmb-overall {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px 24px;
  margin-bottom: 31px;
  background: #EFF9F4;
  border: 1px solid #D8E8E0;
  border-left: 5px solid var(--tmb-green);
  border-radius: 13px;
}

.tmb-overall.degraded {
  background: #FFF7E8;
  border-color: #F0D6A5;
  border-left-color: #D8A043;
}

.tmb-overall.outage {
  background: #FFF0F0;
  border-color: #E8C4C9;
  border-left-color: var(--tmb-red);
}

.tmb-overall-icon {
  color: var(--tmb-green);
  font-size: 24px;
  font-weight: 800;
}

.tmb-overall.degraded .tmb-overall-icon {
  color: var(--tmb-amber);
}

.tmb-overall.outage .tmb-overall-icon {
  color: var(--tmb-red);
}

.tmb-overall-title {
  display: block;
  color: var(--tmb-navy) !important;
  font-size: 17px;
  font-weight: 750;
  margin-bottom: 4px;
}

.tmb-overall-description {
  display: block;
  color: var(--tmb-muted) !important;
  font-size: 12px;
  line-height: 1.6;
}

/* SERVICE GROUPS */

.tmb-service-group {
  margin-top: 32px;
}

.tmb-group-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.tmb-group-number {
  color: var(--tmb-blue) !important;
  font-size: 13px;
  font-weight: 800;
  padding-top: 5px;
}

.tmb-group-title {
  color: var(--tmb-navy) !important;
  font-size: 22px;
  font-weight: 750;
  line-height: 1.3;
  margin: 0 0 6px;
}

.tmb-group-description {
  color: var(--tmb-muted) !important;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

.tmb-service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
}

.tmb-service-card {
  background: #FFFFFF !important;
  color: var(--tmb-text) !important;
  border: 1px solid var(--tmb-border);
  border-radius: 13px;
  padding: 21px 22px;
  min-width: 0;
  box-shadow: 0 3px 14px rgba(23,52,91,.035);
}

.tmb-service-card.degraded {
  border-color: #E8D4A6;
  border-left: 4px solid #D8A043;
}

.tmb-service-card.outage {
  border-color: #E7BFC5;
  border-left: 4px solid var(--tmb-red);
}

.tmb-card-name {
  color: var(--tmb-navy) !important;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.45;
  margin: 0 0 8px;
}

.tmb-card-description {
  color: var(--tmb-muted) !important;
  font-size: 12px;
  line-height: 1.6;
  margin: 0 0 16px;
}

/* ================================================
   NEW: COLOR-CODED SERVICE STATUS PILLS
   ================================================ */

#tmb-dashboard .tmb-card-status {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #B8E6CB;
  background: #E8F7EF;
  color: #14845A !important;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

/* Operational: calm green */

#tmb-dashboard .tmb-card-status.operational {
  background: #E8F7EF !important;
  border-color: #B8E6CB !important;
  color: #14845A !important;
}

/* Degraded: amber with animated indicator */

#tmb-dashboard
.tmb-card-status.degraded_performance {
  background: #FFF3DB !important;
  border-color: #EACB89 !important;
  color: #A96712 !important;
}

/* Outages: soft red with animated indicator */

#tmb-dashboard
.tmb-card-status.partial_outage,
#tmb-dashboard
.tmb-card-status.major_outage {
  background: #FDECEE !important;
  border-color: #F0BFC5 !important;
  color: #BD3844 !important;
}

/* Scheduled maintenance: blue */

#tmb-dashboard
.tmb-card-status.under_maintenance {
  background: #EAF3FF !important;
  border-color: #C5DFF7 !important;
  color: #287CB8 !important;
}

/* Status dot inherits the pill's color */

#tmb-dashboard .tmb-status-dot {
  display: inline-block;
  position: relative;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: currentColor;
}

/* Pulse only when there is an issue */

#tmb-dashboard
.tmb-card-status.degraded_performance
.tmb-status-dot,
#tmb-dashboard
.tmb-card-status.partial_outage
.tmb-status-dot,
#tmb-dashboard
.tmb-card-status.major_outage
.tmb-status-dot {
  animation: tmb-attention-pulse
    2s ease-out infinite;
}

@keyframes tmb-attention-pulse {
  0% {
    box-shadow: 0 0 0 0 currentColor;
  }

  60% {
    box-shadow: 0 0 0 7px transparent;
  }

  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

/* ================================================
   HISTORICAL UPTIME LINK
   ================================================ */

.tmb-history-panel {
  margin-top: 32px;
  padding: 23px 25px;
  background: #F0F5FC;
  border: 1px solid #DCE6F3;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.tmb-history-panel h3 {
  color: var(--tmb-navy) !important;
  font-size: 17px;
  font-weight: 750;
  margin: 0 0 7px;
}

.tmb-history-panel p {
  color: var(--tmb-muted) !important;
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
}

.tmb-history-link {
  color: var(--tmb-blue) !important;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none !important;
  white-space: nowrap;
}

/* Hide native uptime only after dashboard loads */

body.tmb-enhanced .components-section,
body.tmb-enhanced .page-status,
body.tmb-enhanced .text-section {
  display: none !important;
}

/* ================================================
   HISTORY PAGE
   ================================================ */

html.tmb-route-history .layout-content {
  color: #263C56 !important;
  background: transparent !important;
}

html.tmb-route-history .layout-content h1,
html.tmb-route-history .layout-content h2,
html.tmb-route-history .layout-content h3,
html.tmb-route-history .layout-content h4 {
  color: #17345B !important;
}

html.tmb-route-history
.layout-content .incidents-list .date,
html.tmb-route-history
.layout-content .incidents-list .month,
html.tmb-route-history
.layout-content .incidents-list .incident-title,
html.tmb-route-history
.layout-content .incidents-list .incident-name {
  color: #17345B !important;
}

html.tmb-route-history
.layout-content .incidents-list p,
html.tmb-route-history
.layout-content .incidents-list .incident-body,
html.tmb-route-history
.layout-content .incidents-list .update-body {
  color: #475569 !important;
  opacity: 1 !important;
  line-height: 1.75;
}

html.tmb-route-history
.layout-content .color-primary {
  color: #263C56 !important;
}

html.tmb-route-history
.layout-content .color-secondary {
  color: #64748B !important;
}

html.tmb-route-history
.layout-content .history-container,
html.tmb-route-history
.layout-content .history-section,
html.tmb-route-history
.layout-content .history-nav,
html.tmb-route-history
.layout-content .pagination-container {
  color: #263C56 !important;
}

html.tmb-route-history
.layout-content .history-container p,
html.tmb-route-history
.layout-content .history-section p,
html.tmb-route-history
.layout-content .text-section p {
  color: #475569 !important;
  opacity: 1 !important;
}

html.tmb-route-history
.layout-content .uptime-container .name,
html.tmb-route-history
.layout-content .uptime-container .component-name {
  color: #17345B !important;
}

html.tmb-route-history
.layout-content .history-nav a,
html.tmb-route-history
.layout-content .history-container a,
html.tmb-route-history
.layout-content .history-section a,
html.tmb-route-history
.layout-content .incidents-list a,
html.tmb-route-history
.layout-content .pagination-container a {
  color: #287CB8 !important;
  text-decoration: none;
}

/* ================================================
   SUPPORT BANNER
   ================================================ */

.tmb-help-banner {
  width: 92%;
  max-width: 1100px;
  box-sizing: border-box;
  margin: 35px auto;
  padding: 29px 33px;
  background: linear-gradient(
    110deg, #EAF3FF, #F2F3FF
  );
  border: 1px solid #D8E5F5;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.tmb-help-banner h2 {
  color: var(--tmb-navy) !important;
  font-size: 21px;
  font-weight: 750;
  margin: 0 0 8px;
}

.tmb-help-banner p {
  color: #61748C !important;
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
}

.tmb-help-button {
  background: var(--tmb-navy);
  color: #FFFFFF !important;
  border-radius: 8px;
  padding: 13px 20px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
}

.tmb-help-button:hover {
  background: var(--tmb-blue);
}

/* FOOTER */

.tmb-footer {
  background: #FFFFFF;
  border-top: 1px solid var(--tmb-border);
}

.tmb-footer-inner {
  width: 92%;
  max-width: 1100px;
  margin: auto;
  padding: 30px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.tmb-footer-brand {
  color: var(--tmb-muted) !important;
  font-size: 12px;
}

.tmb-footer-brand strong {
  color: var(--tmb-navy) !important;
}

.tmb-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.tmb-footer-links a {
  color: var(--tmb-text) !important;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 768px) {
  .tmb-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .tmb-nav {
    gap: 14px;
  }

  .tmb-service-grid {
    grid-template-columns: 1fr;
  }

  .tmb-hero-inner {
    padding: 34px 0 38px;
  }

  .tmb-hero h1 {
    font-size: 32px;
  }

  .tmb-help-banner,
  .tmb-history-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .tmb-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .tmb-hero h1 {
    font-size: 29px;
  }

  .tmb-service-card {
    padding: 18px;
  }

  .tmb-help-banner {
    padding: 22px;
  }

  #tmb-dashboard .tmb-card-status {
    font-size: 11px;
  }
}

/* Accessibility: disable animations when requested */

@media (prefers-reduced-motion: reduce) {
  .tmb-eyebrow-dot,
  #tmb-dashboard .tmb-status-dot {
    animation: none !important;
  }
}