/* ===== HAPPYFOX PLATFORM CUSTOMIZATIONS ===== */

/* SSO Login Customizations */
.hf-sso_text {
  display: none;
}

.hf-sso_wrap {
  border-bottom: none;
  display: block !important;
}

.hf-login-container_form-wrap #form > div {
  display: none;
}

/* Replace Google APPS Logo with modern Google Sign in Logo */
.hf-login-container_pane.hf-right {
  max-width: 400px;
  margin: 60px auto;
  padding: 32px 24px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Heading */
.hf-login-container_pane .hf-login-container_heading,
.hf-login-container_pane.hf-right .hf-login-container_heading {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #202124;
}

/* Help text under heading */
.hf-login-container_pane .hf-login-container_help-text,
.hf-login-container_pane.hf-right .hf-login-container_help-text {
  font-size: 14px;
  color: #5f6368;
  margin-bottom: 24px;
}

/* Google button styling */
.hf-login-container_pane .hf-sso_btn,
.hf-login-container_pane.hf-right .hf-sso_btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 0 16px;
  height: 44px;
  background: #ffffff;
  border: 1px solid #dadce0;
  border-radius: 4px;
  font-size: 14px;
  color: #3c4043;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(60,64,67,0.3);
  transition: background 0.2s, box-shadow 0.2s;
  margin-bottom: 16px;
}

/* Replace image with Google icon + text */
.hf-login-container_pane .hf-sso_btn img,
.hf-login-container_pane.hf-right .hf-sso_btn img {
  display: none;
}

.hf-login-container_pane .hf-sso_btn::before,
.hf-login-container_pane.hf-right .hf-sso_btn::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background: url("https://upload.wikimedia.org/wikipedia/commons/thumb/c/c1/Google_%22G%22_logo.svg/1024px-Google_%22G%22_logo.svg.png") no-repeat center;
  background-size: contain;
}

.hf-login-container_pane .hf-sso_btn::after,
.hf-login-container_pane.hf-right .hf-sso_btn::after {
  content: "Sign in with Google";
}

/* Form fields styling */
.hf-login-container_pane .hf-form-field,
.hf-login-container_pane.hf-right .hf-form-field {
  width: 100%;
  margin-bottom: 16px;
  text-align: left;
}

/* Makes bottom happyfox copywrite area grey */
.hf-branding {
  background: #e6e6e6;
}

/* kb article links */
.hf-pane-wrapper a {
  text-decoration: underline !important;
}

/* Hide notifications tab from Support Portal, stopping end users from disabling notifications */
.hf-settings-sidebar .hf-settings-sidebar_list > li:last-child {
  display: none;
}

/* styling for status widget */
.hf-custom-textarea_63,
.hf-custom-textarea_64 {
  width: 100%;   
  max-width: 750px;         
  margin: 20px auto;
}

/* Banner height override */
section.hf-banner {
  max-height: 250px;
  min-height: auto;
  padding: 50px 0 !important;
}

/* ===== CIT WIDGETS LAYOUT SYSTEM ===== */

/* Main widgets wrapper */
#cit-widgets-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
}

/* Base widget container styles */
#cit-quick-action-container,
#cit-tip-container,
#cit-outage-container {
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 24px;
  font-family: sans-serif;
  background: white;
  box-sizing: border-box;
}



/* Responsive layout - Desktop */
@media (min-width: 768px) {
  #cit-widgets-wrapper {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
  }
  
  #cit-quick-action-container {
    flex: 0 0 250px;
    max-width: 250px;
    align-self: flex-start;
  }
  
  #cit-tip-container {
    flex: 1 1 300px;
    min-width: 300px;
    align-self: flex-start;
  }

  #cit-outage-container {
    flex: 2 1 400px;
    min-width: 400px;
    align-self: flex-start;
  }
}

@media (min-width: 1024px) {
  #cit-widgets-wrapper {
    gap: 32px;
  }
}

/* Tablet optimizations */
@media (min-width: 768px) and (max-width: 1023px) {
  /* Container padding consistency */
  #cit-quick-action-container,
  #cit-tip-container,
  #cit-outage-container {
    padding: 20px;
  }
  
  /* Status widget tablet optimizations */
  .cit-card,
  .cit-outage,
  .cit-card.cit-outage {
    border-radius: 12px;
  }
  
  /* Consistent title styling */
  #cit-quick-action-title,
  .cit-status-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px 0;
  }
  
  /* Smaller badges for tablet to prevent overflow */
  .cit-badge {
    font-size: 11px;
    padding: 3px 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
  }
  
  .cit-badge.core-services-badge {
    font-size: 10px;
    padding: 2px 8px;
    max-width: 100px;
  }
  
  /* Service pills for tablet */
  .cit-service-pill {
    padding: 3px 10px 3px 5px;
    font-size: 12px;
    max-width: 120px;
    overflow: hidden;
    gap: 4px;
  }
  
  .cit-service-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }
  
  .cit-service-icon svg {
    width: 10px;
    height: 10px;
  }
  
  .cit-service-label {
    font-size: 12px;
    max-width: 50px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  /* Incident cards for tablet */
  .cit-incident-card,
  .cit-maintenance-card {
    padding: 12px;
    border-radius: 8px;
  }
  
  .cit-incident-header,
  .cit-maintenance-header {
    font-size: 14px;
  }
  
  /* Prevent badge overflow in cards */
  .cit-incident-card > div:last-child,
  .cit-maintenance-card > div:last-child {
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .cit-incident-card .cit-badge,
  .cit-maintenance-card .cit-badge {
    max-width: 100px;
    font-size: 10px;
    padding: 2px 8px;
  }
}

/* Mobile optimizations */
@media (max-width: 767px) {
  #cit-widgets-wrapper {
    padding: 12px;
    gap: 16px;
  }
  
  #cit-quick-action-container,
  #cit-tip-container,
  #cit-outage-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    padding: 16px;
  }
  
  /* Status widget mobile optimizations */
  .cit-card,
  .cit-outage,
  .cit-card.cit-outage {
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
  }
  
  /* Reduce status header size on mobile */
  .cit-status-header h2 {
    font-size: 18px;
    margin: 0;
  }
  
  /* Smaller badges on mobile */
  .cit-badge {
    font-size: 11px;
    padding: 3px 12px;
  }
  
  .cit-badge.core-services-badge {
    font-size: 10px;
    padding: 2px 8px;
  }
  
  /* Compact service pills for mobile */
  .cit-service-pill {
    padding: 3px 8px 3px 4px;
    font-size: 11px;
    gap: 4px;
    max-width: 100px;
  }
  
  .cit-service-icon {
    width: 12px;
    height: 12px;
  }
  
  .cit-service-icon svg {
    width: 8px;
    height: 8px;
  }
  
  .cit-service-label {
    font-size: 11px;
    max-width: 40px;
  }
  
  /* Smaller status dots */
  .cit-dot {
    width: 6px;
    height: 6px;
    margin-left: 4px;
  }
  
  /* Compact incident cards */
  .cit-incident-card,
  .cit-maintenance-card {
    padding: 12px;
    border-radius: 8px;
    margin-top: 6px;
    margin-bottom: 6px;
  }
  
  .cit-incident-header {
    font-size: 14px;
    gap: 6px;
  }
  
  .cit-incident-icon,
  .cit-maintenance-icon {
    width: 12px;
    height: 12px;
  }
  
  /* Smaller section headers */
  .cit-incident-section-title {
    font-size: 10px;
  }
  
  /* Compact footer */
  .cit-status-footer {
    font-size: 14px;
    margin-top: 8px;
    padding-top: 8px;
  }
}

/* ===== QUICK ACTION WIDGET ===== */

#cit-quick-action-container {
  font-family: sans-serif;
  box-sizing: border-box;
}

#cit-quick-action-header {
  margin-bottom: 24px;
}

#cit-quick-action-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: #374151;
}

#cit-quick-action-content {
  color: #6b7280;
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 24px;
}

#cit-quick-action-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cit-action-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  text-decoration: none;
  color: #374151;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cit-action-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  text-decoration: none;
  color: #374151;
}

.cit-action-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px auto;
  font-size: 16px;
  color: white;
  font-weight: bold;
}

.cit-action-icon.get-help {
  background: #10b981;
}

.cit-action-icon.training {
  background: #10b981;
}

.cit-action-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 2px 0;
  color: #374151;
}

.cit-action-description {
  font-size: 12px;
  color: #6b7280;
  margin: 0;
}

/* Legacy styles for old HTML structure - will be overridden by JS */
#cit-quick-action-text {
  margin-bottom: 20px;
}

#cit-quick-action-text span {
  font-size: 18px;
  line-height: 1.5;
  display: block;
}

#cit-quick-action-button {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

#cit-quick-action-button:hover {
  background: rgba(255, 255, 255, 0.3);
  text-decoration: none;
  color: white;
}

/* ===== TIP OF THE DAY WIDGET ===== */

#cit-tip-container {
  background: linear-gradient(to right, #002E5D, #003865);
  color: white;
  border-radius: 18px;
  overflow: hidden;
}

#cit-tip-card {
  color: white;
  padding: 10px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#cit-tip-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

#cit-tip-title {
  font-size: 18px;
  margin: 0;
  font-weight: 600;
}

#cit-tip-refresh {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: white;
  opacity: 0.8;
  transition: opacity 0.2s;
}

#cit-tip-refresh:hover {
  opacity: 1;
}

#cit-tip-refresh.spin {
  animation: cit-spin 0.7s cubic-bezier(0.42, 0, 0.58, 1);
}

#cit-tip-text {
  font-size: 15px;
  margin: 0 0 16px 0;
  min-height: 2.5em;
  line-height: 1.5;
  transition: opacity 0.2s;
}

#cit-tip-link {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 10px 16px;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

#cit-tip-link:hover {
  background: rgba(255, 255, 255, 0.3);
  text-decoration: none;
  color: white;
}

/* ===== SYSTEM STATUS WIDGET ===== */

/* Main status card */
.cit-card,
.cit-outage,
.cit-card.cit-outage {
  width: 100%;
  font-family: sans-serif;
  background: white;
  box-sizing: border-box;
}

.cit-status-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
  position: relative;
}

.cit-status-header h2 {
  position: relative;
  margin: 0;
  padding-right: 120px; /* Space for the badge */
}

.cit-status-header .cit-badge {
  position: absolute;
  top: -4px;
  right: 0;
  transform: scale(0.8);
  transform-origin: top right;
}

/* Mobile responsive for status header */
@media (max-width: 767px) {
  .cit-status-header {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
  }
  
  .cit-status-header h2 {
    font-size: 16px;
    margin: 0;
  }
  
  .cit-status-header .cit-badge {
    font-size: 11px;
    padding: 2px 8px;
  }
  
  .cit-status-header .cit-badge svg {
    width: 12px;
    height: 12px;
  }
}

.cit-status-footer {
  border-top: 1px solid #e5e7eb;
  margin-top: 12px;
  padding-top: 12px;
  font-size: 16px;
  color: #6b7280;
}

/* Status badges */
.cit-badge {
  border-radius: 999px;
  padding: 4px 16px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.cit-badge.badge-ok {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}

.cit-badge.badge-issues {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

.cit-badge.badge-maintenance {
  background: #dbeafe;
  color: #1e40af;
  border-color: #93c5fd;
}

.cit-badge.badge-maintenance:hover {
  background: #dbeafe;
  color: #1e40af;
}

/* Incident status badges - keep yellow/orange theme */
.cit-badge.badge-incident-status {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

.cit-badge.badge-incident-status:hover {
  background: #fef3c7;
  color: #92400e;
}

.cit-badge.core-services-badge {
  cursor: default;
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
  font-size: 11px;
  padding: 2px 8px;
  font-weight: 600;
  pointer-events: none;
  transition: none;
  max-width: 120px;
}

.cit-badge.core-services-badge:hover {
  background: #dcfce7;
  color: #166534;
}

.badge-identified {
  background: #fef08a;
  color: #a16207;
  border: 1px solid #fde047;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  display: inline-block;
  text-transform: capitalize;
  margin-left: 8px;
  white-space: nowrap;
}

.badge-issues,
.badge-degraded {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 9px;
  font-weight: 600;
  display: inline-block;
  text-transform: uppercase;
  margin-right: 8px;
  white-space: nowrap;
}

/* Service pills */
.cit-service-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 12px 4px 6px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  flex-shrink: 1;
  min-width: 0;
  max-width: 140px;
  overflow: hidden;
}

.cit-service-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  flex-shrink: 0;
}

.cit-service-icon svg {
  width: 12px;
  height: 12px;
  display: block;
}

.cit-service-label {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70px;
  flex: 1;
  min-width: 0;
}

/* Status dots */
.cit-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-left: 6px;
}

.cit-dot-green { background: #22c55e; }
.cit-dot-orange { background: #f59e42; }
.cit-dot-purple { background: #a78bfa; }
.cit-dot-red { background: #ef4444; }

/* Collapsible sections */
.cit-collapsible-toggle {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}

.cit-collapsible-toggle:hover {
  background: #f3f4f6;
}

.cit-chevron {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.2s;
}

.cit-chevron.open {
  transform: rotate(90deg);
}

/* Incident sections */
.cit-incident-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  margin-bottom: 8px;
}

.cit-incident-section-title {
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Add spacing between incident and maintenance sections */
.cit-incident-section + .cit-incident-section {
  margin-top: 32px;
}

/* Visual separator between sections */
.cit-incident-section:not(:first-child)::before {
  content: '';
  display: block;
  height: 1px;
  background: #e5e7eb;
  margin: 24px 0 16px 0;
}

.cit-incident-card {
  background: #fef9c3;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 8px;
  margin-bottom: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* Maintenance cards - blue theme */
.cit-maintenance-card {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 8px;
  margin-bottom: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.cit-incident-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 4px;
  white-space: nowrap;
}

.cit-maintenance-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #1e40af;
  margin-bottom: 4px;
  white-space: nowrap;
}

.cit-incident-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  color: #dc2626;
  flex-shrink: 0;
}

.cit-maintenance-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  color: #1e40af;
  flex-shrink: 0;
}

.cit-incident-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border-radius: 10px;
  transition: box-shadow 0.15s, background 0.15s;
}

.cit-incident-card-link:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.16);
  background: #fef3c7;
  text-decoration: none;
}

/* Maintenance card link styling */
.cit-incident-card-link .cit-maintenance-card {
  transition: box-shadow 0.15s, background 0.15s;
}

.cit-incident-card-link:hover .cit-maintenance-card {
  box-shadow: 0 8px 24px rgba(0,0,0,0.16);
  background: #dbeafe;
}

/* Skeleton loading */
#cit-outage-skeleton-card {
  padding: 30px;
  font-family: sans-serif;
}

#cit-outage-skeleton-header {
  margin-bottom: 20px;
}

#cit-outage-skeleton-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #374151;
}

#cit-outage-skeleton-line1,
#cit-outage-skeleton-line2,
#cit-outage-skeleton-line3 {
  height: 16px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
  margin-bottom: 12px;
}

#cit-outage-skeleton-line1 { width: 80%; }
#cit-outage-skeleton-line2 { width: 60%; }
#cit-outage-skeleton-line3 { width: 70%; }

#cit-outage-skeleton-footer {
  height: 14px;
  background: #f3f4f6;
  border-radius: 4px;
  margin-top: 20px;
  width: 40%;
}

/* ===== ANIMATIONS ===== */

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes cit-spin {
  0% { transform: rotate(0deg); }
  80% { transform: rotate(360deg); }
  100% { transform: rotate(360deg); }
}

/* ===== BANNER BUTTON WIDGET ===== */

.cit-banner-button-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 16px;
  margin-bottom: 8px;
}

.cit-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cit-banner-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  color: white;
}

.cit-banner-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cit-banner-btn-text {
  font-weight: 600;
  letter-spacing: 0.5px;
}

.cit-banner-btn-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.cit-banner-btn:hover .cit-banner-btn-icon {
  transform: translateX(2px);
}

/* Mobile responsive styles for banner button */
@media (max-width: 767px) {
  .cit-banner-button-wrapper {
    margin-top: 12px;
    margin-bottom: 6px;
  }
  
  .cit-banner-btn {
    padding: 10px 16px;
    font-size: 14px;
    gap: 6px;
  }
  
  .cit-banner-btn-icon {
    width: 14px;
    height: 14px;
  }
}

/* ===== MOBILE RESPONSIVE ENHANCEMENTS ===== */

@media (max-width: 767px) {
  /* Service pills mobile fixes */
  .cit-service-pill {
    flex-shrink: 1;
    min-width: 0;
    max-width: 100%;
    padding: 4px 12px 4px 6px;
    font-size: 13px;
  }
  
  .cit-service-label {
    max-width: 60px;
  }
  
  /* Service pills container wrap */
  #cit-core-services-section > div:last-child {
    flex-wrap: wrap;
    gap: 8px;
    max-width: 100%;
    overflow: hidden;
  }
  
  /* Incident cards mobile layout */
  .cit-incident-card,
  .cit-maintenance-card {
    word-wrap: break-word;
    overflow-wrap: break-word;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 12px;
  }
  
  .cit-incident-header,
  .cit-maintenance-header {
    flex-wrap: wrap;
    gap: 4px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .cit-incident-header span,
  .cit-maintenance-header span {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    line-height: 1.4;
  }
  
  /* Stack badges vertically on mobile */
  .cit-incident-card > div:last-child,
  .cit-maintenance-card > div:last-child {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-top: 8px;
  }
  
  /* Duration badge on mobile */
  .cit-duration-badge {
    font-size: 11px;
    padding: 2px 6px;
    max-width: 100%;
    word-break: break-word;
    white-space: normal;
  }
  
  .cit-incident-card > div:last-child span:last-child,
  .cit-maintenance-card > div:last-child span:last-child {
    margin-left: 0 !important;
  }
  
  /* Incident card links full width */
  .cit-incident-card-link {
    display: block;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Maintenance card links full width on mobile */
  .cit-incident-card-link .cit-maintenance-card {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  /* Reduce spacing between sections on mobile */
  .cit-incident-section + .cit-incident-section {
    margin-top: 20px;
  }
  
  .cit-incident-section:not(:first-child)::before {
    margin: 16px 0 12px 0;
  }
  
  /* Description text on mobile */
  .cit-incident-card > div:nth-child(2),
  .cit-maintenance-card > div:nth-child(2) {
    font-size: 12px !important;
    margin: 6px 0 !important;
    -webkit-line-clamp: 3 !important;
    line-height: 1.3 !important;
  }
  
  /* Show more button on mobile */
  .cit-show-more-btn {
    font-size: 12px;
    padding: 6px 12px;
    margin-top: 8px;
  }
  
  .cit-show-more-btn svg {
    width: 14px;
    height: 14px;
  }
}

/* ===== SYSTEM STATUS WIDGET CSS ===== */

/* Status indicator with pulse animation */
.cit-status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 100%;
  animation: pulse-animation 2s infinite;
  float: right;
}

.cit-status-indicator.operational {
  background-color: #10b981;
  animation: pulse-animation-green 2s infinite;
}

.cit-status-indicator.warning {
  background-color: #f59e0b;
  animation: pulse-animation-yellow 2s infinite;
}

.cit-status-indicator.critical {
  background-color: #ef4444;
  animation: pulse-animation-red 2s infinite;
}

@keyframes pulse-animation-green {
  0% {
    box-shadow: 0 0 0 0px rgba(16, 185, 129, 0.4);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
}

@keyframes pulse-animation-yellow {
  0% {
    box-shadow: 0 0 0 0px rgba(245, 158, 11, 0.4);
  }
  100% {
    box-shadow: 0 0 0 20px rgba(245, 158, 11, 0);
  }
}

@keyframes pulse-animation-red {
  0% {
    box-shadow: 0 0 0 0px rgba(239, 68, 68, 0.4);
  }
  100% {
    box-shadow: 0 0 0 20px rgba(239, 68, 68, 0);
  }
}

@media (max-width: 900px) {
  .cit-status-indicator {
    display: none;
  }
}

/* Status indicator tooltip */
.cit-status-indicator {
  position: relative;
  cursor: help;
}

.cit-status-indicator::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  right: 0;
  background: #1f2937;
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 400px;
  min-width: 250px;
  white-space: normal;
  line-height: 1.5;
  word-wrap: break-word;
}

/* Responsive tooltip for mobile devices */
@media (max-width: 768px) {
  .cit-status-indicator::after {
    max-width: 280px;
    min-width: 200px;
    padding: 10px 12px;
    font-size: 12px;
    right: -50px;
  }
}

@media (max-width: 480px) {
  .cit-status-indicator::after {
    max-width: 240px;
    min-width: 180px;
    padding: 8px 10px;
    font-size: 11px;
    right: -80px;
  }
}

.cit-status-indicator::before {
  content: '';
  position: absolute;
  bottom: 115%;
  right: 12px;
  border: 5px solid transparent;
  border-top-color: #1f2937;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 1000;
}

.cit-status-indicator:hover::after,
.cit-status-indicator:hover::before {
  opacity: 1;
  visibility: visible;
}

/* Core services section styles */
.cit-core-services-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  position: relative;
}

.cit-core-services-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  max-width: 100%;
}

/* System status header layout */
.cit-status-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Text styling patterns */
.cit-section-title {
  color: #6b7280;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.cit-incident-name {
  font-weight: 600;
  font-size: 15px;
  color: #666;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cit-maintenance-name {
  font-weight: 600;
  font-size: 15px;
  color: #1e40af;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cit-component-name {
  font-size: 12px;
  color: #1e40af;
  margin: 4px 0;
  font-weight: 500;
}

.cit-maintenance-component-name {
  font-size: 12px;
  color: #f59e0b;
  margin: 4px 0;
  font-weight: 500;
}

.cit-component-description {
  font-size: 12px;
  color: #666;
  margin: 4px 0;
  font-style: italic;
}

.cit-incident-body {
  font-size: 13px;
  color: #666;
  margin: 8px 0;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cit-maintenance-body {
  font-size: 13px;
  color: #666;
  margin: 8px 0;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cit-timing-info {
  font-size: 12px;
  color: #666;
}

.cit-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.cit-badge-auto-margin {
  margin-left: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.cit-duration-badge {
  font-size: 12px;
  padding: 2px 8px;
  max-width: none;
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
}

.cit-duration-display {
  font-size: 13px;
  color: #1e40af;
  font-weight: 500;
  margin: 4px 0;
}

/* Show more/less button for maintenance items */
.cit-show-more-btn {
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 16px;
  margin-top: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #374151;
  transition: all 0.2s ease;
  width: 100%;
  justify-content: center;
}

.cit-show-more-btn:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.cit-show-more-btn svg {
  transition: transform 0.2s ease;
}

.cit-show-more-btn:hover svg {
  transform: translateY(1px);
}

/* Maintenance container */
.cit-maintenance-container {
  margin-bottom: 8px;
}

/* Error message styles */
.cit-error-container {
  padding: 16px;
  text-align: center;
}

.cit-error-message {
  color: #ef4444;
  font-size: 14px;
  margin-bottom: 8px;
}

.cit-error-help {
  color: #6b7280;
  font-size: 12px;
}

/* Incident updates styling */
.cit-incident-updates {
  margin: 8px 0;
  border-left: 3px solid #e5e7eb;
  padding-left: 12px;
}

.cit-update-item {
  margin-bottom: 8px;
  padding: 8px;
  background: #f9fafb;
  border-radius: 4px;
}

.cit-update-item:last-child {
  margin-bottom: 0;
}

.cit-update-status {
  font-weight: 600;
  font-size: 12px;
  color: #1e40af;
  margin-bottom: 2px;
}

.cit-update-date {
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 4px;
}

.cit-update-body {
  font-size: 12px;
  color: #374151;
  line-height: 1.4;
}

/* SVG icon styling */
.cit-svg-icon {
  width: 16px;
  height: 16px;
  display: block;
  margin: auto;
}
