/*.qdc-bars-wrap {
  max-height: 400px;       
  overflow-y: auto;
  padding-right: 6px;       
}*/

 /* Container */
.qdc-dashboard {
  
}
.qdc-dashboard-chart-container{
    display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}
/* Section title */
.qdc-section-title {
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
}

/* Card styling */
.qdc-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 20px;
}

/* Card titles */
.qdc-card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: center;
}

/* Chart wrappers */
.qdc-chart-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 280px;
}

.qdc-chart-scroll {
  height: auto;
  max-height: 800px;
  overflow-y: auto;
  padding: 8px;
}

/* Risk label under gauge */
.qdc-risk {
  text-align: center;
  margin-top: 12px;
  font-size: 16px;
  font-weight: 500;
}

.qdc-risk span {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: #fce8e6;
  color: #d93025;
}


/* nice thin scrollbar (WebKit) */
.qdc-bars-wrap::-webkit-scrollbar { width: 8px; }
.qdc-bars-wrap::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 6px; }
.qdc-bars-wrap::-webkit-scrollbar-thumb { background: linear-gradient(180deg,#42a5f5,#26a69a); border-radius: 6px; }
.qdc-bars-wrap::-webkit-scrollbar-thumb:hover { background: #2491c9; }


 
.qdc-close {
  position: absolute;
  top: 10px; right: 20px;
  font-size: 28px;
  cursor: pointer;
}

.qdc-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  font-size: 14px;
  color: #555;
}

.qdc-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3f51b5;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: qdc-spin 1s linear infinite;
  margin-bottom: 10px;
}

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

 /* Container */
.qdc-dashboard-chart-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

/* Card */
.qdc-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 20px;
  flex: 1; /* allow flexible resizing */
  min-width: 0;
}

/* Gauge & Bars default (desktop) */
.qdc-gauge {
  max-width: 100%;
  margin: 0 auto;
}

.qdc-bars {
  max-width: 100%;
  margin: 0 auto;
}

.qdc-bars canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ---- RESPONSIVE FIXES ---- */

/* Tablet (up to 1024px) */
@media (max-width: 1024px) {
  .qdc-gauge {
    max-width: 100% !important;
  }
  .qdc-bars {
    max-width: 100% !important;
  }
}

/* Mobile (up to 768px) */
@media (max-width: 768px) {
  .qdc-dashboard-chart-container {
    flex-direction: column !important; /* stack vertically */
  }
  .qdc-gauge,
  .qdc-bars {
    max-width: 100% !important;
  }
  .qdc-bars canvas {
    height: auto !important;
  }
}

/* Small mobile (up to 480px) */
@media (max-width: 480px) {
  .qdc-gauge,
  .qdc-bars {
    max-width: 100% !important;
  }
  .qdc-bars canvas {
  width: 100% !important;
  height: auto !important;
  min-height: 600px;
}
  
  .qdc-chart-scroll {
  height: auto;
  max-height: none; /* allow full height on mobile */
  overflow-y: visible; /* no cut off */
  padding: 8px;
}


}


/* --- Default Table --- */
.qdc-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.qdc-table {
  width: 100%;
  border-collapse: collapse;
}

.qdc-table th, .qdc-table td {
  padding: 10px;
  text-align: center;
  border: 1px solid #e0e0e0;
  font-size: 14px;
}

/* --- Mobile Card View --- */
@media (max-width: 768px) {
  .qdc-table thead {
    display: none; /* hide headers */
  }

  .qdc-table, 
  .qdc-table tbody, 
  .qdc-table tr, 
  .qdc-table td {
    display: block;
    width: 100%;
  }

  .qdc-table tr {
    background: #fff;
    margin-bottom: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    padding: 12px;
  }

  .qdc-table td {
    text-align: left;
    border: none;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    padding: 8px 6px;
    position: relative;
  }

.risk-label {
	margin-top: -42px !important;
	
}
  .qdc-table td:last-child {
    border-bottom: none; /* no border on last item */
  }

  /* add labels using data-label attribute */
  .qdc-table td::before {
    content: attr(data-label) !important;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
    color: #444;
  }
}


/* Fix WooCommerce responsive table labels */
@media (max-width: 768px) {
  .qdc-table thead {
    display: none !important; /* Hide headers */
  }

  .qdc-table tr {
    display: block;
    margin-bottom: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    padding: 12px;
    background: #fff;
  }

  .qdc-table td {
    display: block;
    text-align: left !important;
    border: none !important;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    padding: 8px 6px;
  }

  .qdc-table td:last-child {
    border-bottom: none;
  }
 
}


/* Modal base */
#qdc-report-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  overflow-y: auto; /* allow scrolling inside modal */
}

/* Modal content */
.qdc-modal-content {
  background: #fff;
  margin: 5% auto;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 900px;
  position: relative;
  max-height: 90vh;   /* fit viewport */
  overflow-y: auto;   /* scroll inner content if needed */
  box-sizing: border-box;
}

/* Chart scroll fix */
.qdc-chart-scroll {
  height: auto;
  max-height: none;
  overflow-y: visible;
  padding: 8px;
}

@media (min-width: 1025px) {
  .qdc-chart-scroll {
    max-height: none;
    overflow-y: auto;
  }
}

/* Responsive bar canvas */
.qdc-bars canvas {
  width: 100% !important;
  height: auto !important;
  min-height: 250px;
}


/* Logo styling */
    .qdc-logo-wrap {
      display: flex;
      justify-content: center;
      margin-bottom: 10px;
    }
    .qdc-logo {
      max-width: 100px; /* default size */
      height: auto;
    }

    /* Tablet */
    @media (max-width: 1024px) {
      .qdc-logo { max-width: 80px; }
    }

    /* Mobile */
    @media (max-width: 768px) {
      .qdc-logo { max-width: 60px; }
    }

    /* Small Mobile */
    @media (max-width: 480px) {
      .qdc-logo { max-width: 50px; }
    }
    
 .qdc-card-header {
  display: flex;
  align-items: center;
  justify-content: center; /* center contents */
  gap: 10px;
  margin-bottom: 15px;
  position: relative;
}

.qdc-logo {
  width: 50px;
  height: auto;
  border-radius: 50%;
  position: absolute;
  left: 0; /* push logo to the left edge */
  bottom: -68px;
}
.qdc-card-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 auto;
  text-align: center;
}
