/* Profile Overview Tab Styles */

/* Info Container Section */
.info-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 20px 0;
  align-items: center;
}

/* Chart styles */
#profile-chart{
  height: 310px !important;
}

#profile-chart.premium-content {
  height: 100%;
  width: 100%;
  display: block;
  position: relative;
  cursor: pointer;
}

/* Info Container Right Section (extracted from profile-modal.css lines 276-283) */
.info-container-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

/* Profile Info Wrapper (extracted from profile-modal.css lines 286-292) */
.profile-info-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* Rectangular tiles wrapper (extracted from profile-modal.css lines 295-304) */
.rect-tiles-wrapper {
  flex-basis: 100%;
  width: 100%;
  max-width: 450px; /* Limits to max 2 tiles per row (210px * 2 + gap + padding) */
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
}

/* Square info boxes (extracted from profile-modal.css lines 307-328) */
.info-box {
  padding: 10px;
  background: var(--semi-transparent-bg);
  color: var(--text-color);
  border-radius: 6px;
  width: 100px;
  height: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.info-box h4 {
  font-size: 1rem;
  margin: 0;
}

.info-box p {
  margin: 5px 0 0 0;
}

/* Rectangular Info Boxes (extracted from profile-modal.css lines 332-360) */
.info-box-rect {
  padding: 12px 20px;
  background: var(--semi-transparent-bg);
  color: var(--text-color);
  border-radius: 6px;
  width: 210px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.rect-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.info-box-rect h4 {
  font-size: 1rem;
  margin: 0;
}

.info-box-rect p {
  margin: 0;
}

/* Player Info Header */
.player-info-header {
  padding: 0 20px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.opgg-link {
  display: block;
  text-decoration: none;
}

.opgg-icon {
  width: 100%;
  height: auto;
}

/* Graph Unlock Tooltip */
.graph-unlock-tooltip {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  background: var(--secondary-color);
  color: var(--text-color);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9em;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.premium-content-wrapper:hover .graph-unlock-tooltip {
  opacity: 0;
  visibility: hidden;
}

.premium-content-wrapper.show-unlock-tooltip:hover .graph-unlock-tooltip,
.info-container:has(.premium-content-wrapper.show-unlock-tooltip):hover .graph-unlock-tooltip {
  opacity: 1;
  visibility: visible;
}

/* Chart Loader Spinner */
.chart-loader {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 20;
  width: 48px;
  height: 48px;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.chart-loader .spinner {
  border: 4px solid rgba(255,255,255,0.2);
  border-top: 4px solid var(--primary-color, #3ceb36);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.premium-content > canvas {
  filter: blur(4px);
}

/* Responsive styles */
@media (max-width: 600px) {
  .info-box-rect {
    width: 260px;
    height: 40px;
    padding: 8px 12px;
  }

  .player-info-header {
    padding: 0 10px;
  }
}