/* ------------------------------
   Chart container
------------------------------ */

.ifl-dam-chart-block {
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid #868686;
  border-radius: 10px;
  background: #757575;
  color: #f4f4f4;
  font-weight: 400;
}

/* ------------------------------
   Header (name + dropdown)
------------------------------ */

.ifl-dam-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: nowrap;
}

.ifl-dam-chart-head strong {
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  color: #141414;
  text-overflow: ellipsis;
}

.ifl-dam-chart-head select {
  flex-shrink: 0;
}

.ifl-dam-chart-name {
  font-weight: 600;
}

/* ------------------------------
   Dropdown styling
------------------------------ */

.ifl-dam-chart-block select {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: #bebebe !important;
  cursor: pointer;
  color: #282828 !important;
  accent-color: #ff7300;
}

.ifl-dam-chart-block select:hover {
  background-color: #d6d6d6 !important;
}

.ifl-dam-chart-block select:focus {
  outline: none;
  border-color: #ee4507;
  box-shadow: 0 0 0 2px rgba(105, 114, 122, 0.2);
}

.ifl-dam-range select {
  background-color: #873f3f !important;
}

/* ------------------------------
   Chart area (fixed height)
------------------------------ */

.ifl-dam-chart-canvas {
  position: relative;
  height: 220px;
  margin-bottom: 10px;
}

.ifl-dam-chart-canvas canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  padding: 10px;
  box-sizing: border-box;
  background: linear-gradient(#bebebe, #e4e4e4);
  border-radius: 8px;
}

/* ------------------------------
   Stats area
------------------------------ */

.ifl-dam-stats {
  font-size: 13px;
  color: #0e0e0e;
  padding-top: 4px;
  font-weight: 600;
}

.ifl-dam-stats strong {
  color: #f2f2f2;
  font-weight: 500;
}

/* ------------------------------
   Responsive tweaks
------------------------------ */

@media (max-width: 600px) {
  .ifl-dam-chart-block {
    padding: 12px;
  }

  .ifl-dam-chart-canvas {
    height: 200px;
  }
}

@media (max-width: 420px) {
  .ifl-dam-chart-head {
    flex-wrap: wrap;
  }
}

/* ---------------------------------
   Row-wide dam level bar with label
---------------------------------- */
.ifl-dam-bar-row td {
  padding: 4px 10px 12px;
}

.ifl-dam-level-wrap {
  width: 100%;
  height: 14px;
  background: #c9c9c92e;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  height: 30px;
  margin-bottom: 15px;
  border: 1px solid #d2d2d2;
}

.ifl-dam-name {
  font-size: 14px;
  font-weight: 600;
  color: #cbcbcb;
}

.ifl-dam-level-bar {
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 0 6px 6px 0;
  justify-content: flex-end;
  padding-right: 6px;

  background: linear-gradient(90deg, #ff8000, #f57104);
}

.ifl-dam-level-label {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1;
  white-space: nowrap;
}

/* keep name/value row tight */
.ifl-dam-row td {
  padding-bottom: 1px;
}

/* Remove row separator lines */
.ifl-dam-levels-table,
.ifl-dam-levels-table tr,
.ifl-dam-levels-table td {
  border: none !important;
  padding: 0;
  margin: 0;
}

/* If WordPress theme adds zebra / bottom borders */
.ifl-dam-levels-table tr {
  box-shadow: none;
  background: transparent;
}
