/* Metrics Table Section - Desktop Styles */

.metrics-table-section {
  margin: 60px auto;
}

.metrics-table-section h2 {
  font-family: "SangBleuRegular", serif;
  font-weight: 400;
  color: #1f2225;
  line-height: 1.2;
  margin-bottom: 6px;
}

.metrics-table-section p {
  font-family: "Inter", sans-serif;
  font-size: var(--fluid-16-20);
  font-weight: 400;
  color: #3f3b37;
  margin-bottom: 30px;
}

/* Metrics Table */
.metrics-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: none;
  border-radius: 0;
  overflow: hidden;
  font-family: var(--font-family);
  position: relative;
}

.metrics-table th {
  background-color: #fff;
  padding: 16px;
  padding-bottom: 0;
  text-align: left;
  font-size: 24px;
  font-weight: 500;
  color: #1f2225;
  border-right: 1px solid #e0dad1;
  width: 18.75%;
}

.metrics-table th span {
  background-image: linear-gradient(to top, #6b3305 100%, #ae734e 41%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-family);
}

.metrics-table th:first-child {
  text-align: left;
  width: 25%;
}

.metrics-table th:last-child {
  border-right: none;
}

.metrics-table td:last-child {
  border-right: none;
}

.metrics-table td {
  padding: 12px;
  text-align: left;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: normal;
  color: #1f2225;
  border-right: 1px solid #e0dad1;
}

.metrics-table tr {
  border: none;
}

.metrics-table tbody tr:not(:last-child) {
  border-bottom: none;
}

.metrics-table tr td,
.metrics-table tr th {
  border-top: none;
  border-bottom: none;
}

.metrics-table tr td:first-child {
  text-align: left;
  border-left: 0;
}

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

.metrics-table .metric-row {
  height: 80px;
}

.metrics-table .metric-cell {
  position: relative;
}

/* Metrics Name and Icon */
.metrics-name {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 8px;
}

.metrics-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Metrics Value and Progress Bar */
.metrics-value {
  font-size: var(--fluid-14-16);
  font-weight: 600;
  display: inline-block;
  vertical-align: middle;
  width: 30px;
  text-align: right;
  margin-right: 10px;
}

.metrics-bar {
  display: inline-block;
  vertical-align: middle;
  height: 4px;
  position: relative;
  background-color: var(--color-rank-grey);
  width: calc(100% - 60px);
}

.metrics-progress {
  position: absolute;
  top: 50%;
  left: 0;
  height: 6px;
  transform: translateY(-50%);
}

.metrics-progress.red {
  background-color: var(--color-rank-red);
}

.metrics-progress.green {
  background-color: var(--color-rank-green-dark);
}

.metrics-progress.yellow {
  background-color: var(--color-rank-yellow);
}

/* Blurred Cell */
.blurred-cell {
  filter: blur(10px);
  opacity: 0.6;
}

/* Lock Content */
.metric-table-lock {
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  border-radius: 8px
}

.metric-table-lock .metric-table-lock-text {
  margin: 20px 0;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

/* Metrics Tabs */
.metrics-tabs {
  display: flex;
  border-bottom: 1px solid #e0dad1;
  overflow-x: auto;
}

.metrics-tab {
  flex: 1;
  padding: 16px 8px;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-size: var(--font-size-base);
  font-weight: 600;
  color: #5f5b55;
  border-right: 1px solid #e0dad1;
  background-color: #f3f3f3;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  text-align: center;
  min-width: 160px;
}

.metrics-tab:last-child {
  border-right: none;
}

.metrics-tab svg {
  width: 30px;
  height: 30px;
}

.metrics-tab img {
  width: 30px;
  height: 30px;
  filter: brightness(0) saturate(100%) invert(39%) sepia(7%) saturate(932%) hue-rotate(19deg) brightness(94%) contrast(91%);
}

.metrics-tab.active {
  color: #fff !important;
  font-weight: 600;
  background: linear-gradient(145deg, var(--color-primary), #472101 90%);
}

.metrics-tab.active img {
  filter: brightness(0) saturate(100%) invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%);
}

.metrics-tab.active::after {
  content: none;
}

.metrics-tab-content {
  display: none;
  padding-bottom: 0px;
  background-color: #fff;
  position: relative;
}

.metrics-tab-content.active {
  display: block;
}

/* Metrics Container */
.metrics-container {
  border: 1px solid #e0dad1;
  border-radius: 12px;
  overflow: hidden;
}

/* Metrics Dropdown - Hidden by default */
.metrics-dropdown {
  display: none;
}

@media (max-width: 920px) {
  .metrics-table-section {
    margin: 40px auto;
  }
  .blurred-cell {
    display: none;
  }
  .metric-table-lock {
    display: none;
  }
  .metrics-table td {
    border-right: none;
  }
  .metrics-table th {
    border-right: none;
  }
  .metrics-table th:first-child {
    border-right: 1px solid #e0dad1;
  }
  .metrics-table td:first-child {
    border-right: 1px solid #e0dad1;
  }
  
  .metrics-table th {
    font-size: 20px;
  }

  .metrics-table td {
    font-size: 16px;
  }

}

@media (max-width: 768px) {
  .metrics-table-section {
    margin: 20px auto;
  }

  .metrics-table th {
    font-size: 16px;
  }

  .metrics-table td {
    font-size: 14px;
  }
  
  /* Hide tabs and show dropdown */
  .metrics-tabs {
    display: none;
  }
  
  .metrics-dropdown {
    display: block;
  }
  
  .metrics-dropdown select {
    width: 100%;
    padding: 12px 16px;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #1f2225;
    background-color: #fff;
    border: none;
    border-bottom: 1px solid #e0dad1;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f5b55' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }
  
  .metrics-dropdown select:hover {
    outline: none;
  }
  
  .metrics-dropdown select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(107, 51, 5, 0.1);
  }

  .metrics-icon {
    width: 20px;
    height: 20px;
  }

  .metrics-table th {
    padding: 12px;
    padding-bottom: 0;
  }

  .metrics-table td {
    padding: 10px 6px;
  }
  
}
