@import url("https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap");

:root {
  --green: #27ae60;
  --yellow: #f1c40f;
  --red: #e74c3c;
  --blue: #0088b3;
  --bg-light: #f4f7f9;
}

body {
  font-family: "Quicksand", Sans-serif;
  background-color: var(--bg-light);
  margin: 0;
  color: #333;
}

.container {
  max-width: 1100px;
  margin: 50px auto 50px auto;
  padding: 20px;
}

/* Header */
.main-header {
  background-position: initial;
  background-repeat: no-repeat;
  background-size: cover;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  margin: 60px 0px;
}

.main-header h1 {
  color: #ffffff;
}

.main-header .overlay {
  /* background: rgba(0, 136, 179, 0.8); */
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Summary Grid */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.summary-card {
  background: white;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  overflow: hidden;
  /* box-shadow: 0 4px 6px rgba(0,0,0,0.05); */
  position: relative;
}

.card-left {
  padding: 25px;
  display: flex;
  flex-direction: column;
  /* This puts the text below the icon */
  justify-content: center;
  /* Centers content vertically */
  gap: 15px;
  /* Space between icon box and text content */
  flex: 1;
}

.text-content h3 {
  font-size: 0.85rem;
  margin: 0;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.text-content p {
  font-size: 0.75rem;
  color: #888;
  margin: 8px 0 0 0;
  line-height: 1.4;
}

.card-right {
  width: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.icon-box {
  width: 46px;
  text-align: center;
  padding: 10px 15px;
  border-radius: 8px;
  color: white;
  font-weight: bold;
}

.card-left h3 {
  font-size: 0.9rem;
  margin: 0;
}

.card-left p {
  font-size: 0.75rem;
  color: #777;
  margin: 5px 0 0 0;
}

.card-right {
  width: 80px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  padding: 24px 0px;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  position: relative;
  z-index: 1;
}

/* Quarter Circle Backgrounds */
.card-right::before {
  content: "";
  position: absolute;
  top: -75%;
  right: 0;
  bottom: 25%;
  left: -25%;
  background: currentColor;
  opacity: 0.1;
  border-radius: 100% 0 0 100% / 50% 0 0 50%;
  z-index: -1;
}

.status-green {
  border: 1px solid var(--green);
}

.status-green .icon-box {
  background: var(--green);
}

.status-green .card-right {
  color: var(--green);
}

.status-line-green {
  color: var(--green);
}

.status-yellow {
  border: 1px solid var(--yellow);
}

.status-yellow .icon-box {
  background: var(--yellow);
}

.status-yellow .card-right {
  color: var(--yellow);
}

.status-line-yellow {
  color: var(--yellow);
}

.status-red {
  border: 1px solid var(--red);
}

.status-red .icon-box {
  background: var(--red);
}

.status-red .card-right {
  color: var(--red);
}

.status-line-red {
  color: var(--red);
}

/* Table Section */
.status-section {
  border-radius: 12px;
  margin-bottom: 30px;
}

.section-title {
  border-left: 5px solid var(--blue);
  padding-left: 15px;
  font-size: 1.5rem;
  margin-bottom: 25px;
}

.table-container {
  background: white;
}

#idx-status-table table {
  width: 100%;
  border-collapse: collapse;
}

#idx-status-table th {
  /* text-align: left; */
  color: #999;
  font-weight: 400;
  padding: 10px;
  background: var(--bg-light);
  border-bottom: 2px solid #E4E7EE;
}

#idx-status-table td {
  padding: 20px 10px;
  border-bottom: 1px solid #E4E7EE;
}

table tbody tr {
    border: 0px solid #bcc0c4;
    border-bottom: 1px solid #E4E7EE;
}


table thead tr {
    border: 0px solid #ffffff;
    border-bottom: 1px solid #bcc0c4;
    background: #F8F9FB;
    color: #bcc0c4;
}

table th,
table td {
  text-align: left;
}

.status-dot {
  background: var(--green);
  color: white;
  padding: 2px 6px;
  border-radius: 50%;
  font-size: 0.8rem;
}

.text-muted {
  font-size: 0.85rem;
  color: #888;
}

/* Bottom Card */
.info-card {
  background: white;
  border: 1px solid #b3e5fc;
  border-radius: 12px;
  display: flex;
  align-items: center;
  padding: 20px 40px;
  position: relative;
  overflow: hidden;
}

.info-card::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -20px;
  width: 200px;
  height: 200px;
  background: var(--blue);
  opacity: 0.05;
  border-radius: 50%;
}

.tool-icon {
  font-size: 2rem;
  margin-right: 20px;
}

.info-center {
  flex-grow: 1;
}

.info-center h3 {
  margin: 0;
  font-size: 1.1rem;
}

.info-center p {
  margin: 5px 0 0 0;
  color: #666;
  font-size: 0.9rem;
}

.btn-blue {
  background: var(--blue);
  color: white;
  text-decoration: none;
  padding: 10px 25px;
  border-radius: 25px;
  font-size: 0.9rem;
  position: relative;
  z-index: 2;
}

.idx-status-container {
  margin: 0px 160px;
}

.info-right{
  width: 290px;
}

@media (max-width: 768px) {
  .idx-status-container {
    margin: 0px 20px;
  }

  .main-header {
    background-size: auto;
  }

  .summary-grid {
    grid-template-columns: 1fr !important;
  }

  .table-container {
    overflow-x: auto;
  }

  table {
    min-width: 600px;
  }

  .info-card {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .info-left,
  .info-right {
    margin: 10px 0;
  }
}


@media (min-width: 769px) and (max-width: 980px) {
  .idx-status-container {
    margin: 0px 40px; 
  }

  .summary-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .info-card {
    flex-direction: row;
    padding: 25px;
  }
}

.idx-alert-yellow {
  background-color: #fff9e6;
  border-left: 5px solid #ffcc00;
  padding: 20px;
  margin: 20px 0;
  border-radius: 4px;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  color: #856404;
}
.idx-alert-yellow i {
  font-size: 1.5rem;
  color: #ffcc00;
  margin-top: 3px;
}
.idx-alert-content h4 {
  margin: 0 0 5px 0;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 1.1rem;
}
.idx-alert-content p {
  margin: 0;
  line-height: 1.5;
}
.idx-alert-link {
  color: #856404;
  text-decoration: underline;
  font-weight: 600;
}


/* --- Tooltip Styles --- */
.status-icon-wrapper {
  position: relative;
  cursor: help;
  display: inline-block;
}

.status-icon-wrapper::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 10px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 10;
  font-weight: 600;
}

.status-icon-wrapper:hover::after {
  opacity: 1;
  visibility: visible;
}

/* --- Responsive Table Handling --- */
.desktop-only { display: block; }
.mobile-only { display: none; }

/* Mobile Status Card */
.mobile-status-card {
  background: #fff;
  border: 1px solid #E4E7EE;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.mobile-card-header {
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-name-group {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.mobile-accordion-toggle {
  font-size: 12px;
  color: var(--blue);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.mobile-accordion-toggle i {
  transition: transform 0.3s ease;
}

.mobile-status-card.active .mobile-accordion-toggle i {
  transform: rotate(180deg);
}

.mobile-card-detail {
  background-color: #F3F4F6;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  font-size: 13px;
  color: #555;
}

.mobile-status-card.active .mobile-card-detail {
  padding: 15px;
  max-height: 200px; /* Adjust if content is very long */
}

.mobile-card-footer {
  padding: 10px 15px;
  font-size: 11px;
  color: #999;
  border-top: 1px solid #eee;
}

/* Media Queries */
@media (max-width: 768px) {
  .desktop-only { display: none; }
  .mobile-only { display: block; }
  
  .idx-status-container {
    margin: 0px 20px;
  }
}