/**
 * instaplug-graph.css
 * 
 * Styles for the graph dashboard component of the Social Media Feed Widget plugin.
 * 
 * This file contains CSS rules for layout, typography, and visual styling of the graph dashboard.
 */

.lwip-dashboard-container {
  font-family: "Nunito", sans-serif;
  padding: 20px;
  width: 95%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lwip-chart-row {
  display: flex;
  width: 102%;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
}

.lwip-chart-half {
  flex: 0 0 48%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lwip-chart-card-container-body-flex {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.lwip-chart-card-container {
  background: #ffffff;
  border-radius: 10px;
  padding: 15px;
  width: 100%;
  position: relative;
}

.lwip-chart-card-container:hover {
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.lwip-chart-full-height {
  height: 425px;
}

.lwip-chart-card-container-head {
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 8px;
  font-size: 16px;
  font-weight: 600;
}

div#lwip-device-usage-chart {
  width: 70%;
  height: 347px;
}

div#lwip-geo-demography-chart {
  width: 60%;
  height: 347px;
}

/* Customized table styling */
#lwip-device-usage-table-chart,
#lwip-geo-demography-table-chart {
  flex: 1;
  height: 347px;
  overflow-x: auto;
}

#lwip-geo-demography-table-chart td,
#lwip-device-usage-table-chart td,
#lwip-device-usage-table-chart th,
#lwip-geo-demography-table-chart th {
  text-align: center !important;
  vertical-align: middle !important;
  padding: 10px;
  border-right: none;
  text-align: left;
  border-color: #d3edf7;
}

#lwip-geo-demography-table-chart th,
#lwip-device-usage-table-chart th {
  font-size: 14px;
  font-weight: 700;
}

#lwip-geo-demography-table-chart .google-visualization-table-tr-sel,
#lwip-geo-demography-table-chart .google-visualization-table-tr-over,
#lwip-device-usage-table-chart .google-visualization-table-tr-sel,
#lwip-device-usage-table-chart .google-visualization-table-tr-over {
  background-color: #fff !important;
}

#lwip-geo-demography-table-chart .google-visualization-table thead tr th,
#lwip-device-usage-table-chart .google-visualization-table thead tr th {
  background-color: white;
}

/* Responsive layout */
@media (min-width: 768px) and (max-width: 1024px) {
  .lwip-chart-row {
    flex-direction: column;
  }

  .lwip-chart-half {
    flex: 0 0 100%;
  }
}

.lwip-graph-loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

.lwip-graph-loading-container .lwip-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lwip-graph-loading-container svg {
  width: 100px;
  height: 100px;
  margin-bottom: 10px;
}

.lwip-graph-loading-container .lwip-loading-text {
  font-size: 16px;
  color: #000;
  font-weight: 500;
  text-align: center;
}

/* Dashboard header */
.lwip-feed-graph-dashboard-header {
  font-family: "Nunito", sans-serif;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 94%;
  background-color: #fff;
  padding: 15px 22px;
  border-radius: 8px;
  border: 1px solid #ddd;
  margin: 20px 0 0 6px;
}

/* Back Button */
.lwip-feed-graph-dashboard-header-back-btn {
  justify-content: center;
  align-items: center;
  font-weight: 500;
  cursor: pointer;
  font-size: 18px;
  width: 20px;
  color: #27c4cf;
}

.lwip-feed-graph-dashboard-header-back-btn:hover {
  color: #27c4cf;
  background: rgba(0, 0, 0, 0.06);
}

.lwip-feed-graph-dashboard-header-back-btn svg {
  vertical-align: middle;
}

.lwip-feed-graph-dashboard-header-back-icon {
  padding: 5px 0;
}

.lwip-feed-graph-dashboard-header-title {
  font-family: "Nunito", sans-serif;
  font-weight: 700;
  font-size: 17px;
  margin-left: 8px;
}

.lwip-date-range-picker-icon,
.lwip-date-range-picker-icon-span,
.lwip-date-range-picker-container,
.lwip-date-range-clear-icon,
.lwip-feed-graph-dashboard-header-back-btn svg,
.lwip-feed-graph-dashboard-header-back-container,
.lwip-feed-graph-dashboard-header-back-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Date Range Picker */
.lwip-date-range-picker-container {
  position: relative;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  border: 1px solid #d9d9d9;
  background: #fff;
  min-width: 270px;
  height: 14px;
  justify-content: space-between;
  cursor: pointer;
}

.lwip-date-range-picker-container:hover {
  border: 1px solid #69d1d8;
}

.lwip-date-range-picker-icon {
  margin-left: 5px;
}

.lwip-date-range-clear-icon {
  display: none;
  cursor: pointer;
  color: #888;
  margin-left: 5px;
  margin-bottom: -3px;
}

/* Disable pointer events on Google Chart tooltips */
.lwip-dashboard-container svg > g > g.google-visualization-tooltip {
  pointer-events: none !important;
}
