/* src/components/UserProfile/UserProfile.css */

/* Container for the profile page */
.user-profile {
    margin: auto;
    max-width: 1200px;
    margin-top: 40px;
  }


  .user-profile h1 {
    margin: 0px;
  }
  
  /* Media query for responsiveness (optional, handled by react-grid-layout) */
  @media (max-width: 1200px) {
    .layout {
      width: 100%;
    }
  }

  .user-profile {
    margin: auto;
    max-width: 1200px;
    opacity: 0; /* Initially hidden */
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
  }
  
  .user-profile.fade-in {
    opacity: 1;
    transform: translateY(0);
  }
  
  .user-profile.hidden {
    display: none;
  }
  
  .user-profile.loading-container {
    opacity: 1;
    transition: opacity 1s ease;
  }
  
  .user-profile.loading-container.fade-out {
    opacity: 0;
    pointer-events: none;
  }
  
  .user-profile-header {
    text-align: center;
  }

  .react-grid-item.react-grid-placeholder {
    background: #3B9AF8 !important;
    border-radius: 8px;
    opacity: 0.2;
    transition-duration: 100ms;
    z-index: 2;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
    user-select: none;
  }

  .react-grid-item.react-grid-placeholder.placeholder-resizing {
    transition: none;
  }

  .react-grid-layout {
    margin-bottom: 40px;
  }

  /* src/components/UserProfile/UserProfile.css */

  .user-profile-header {
    display: inline-grid;
    column-gap: 50px;
    row-gap: 22px;
    justify-content: center;
    text-align: center;
    grid-auto-flow: column;
    margin-left: 36.5px;
  }


.toggle-button {
  padding: 10px 20px;
  margin: 0 5px;
  border: none;
  background-color: #a9a9a9;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.3s;
}

.toggle-button.active {
  background-color: #3B9AF8;
  color: white;
}

.toggle-button:hover {
  background-color: #ccc;
}

.user-profile-header p {
  margin-bottom: 0px;
  margin-top: 0px;
}

.user-profile-header h2 {
  font-size: 1.2em;
  margin: 0px;
}

.user-profile-header h1 {
  margin-bottom: 0px;
  line-height: 0.9em;
}

.text-center.font-semibold.mt-2 {
  font-size: 1.2em;
  font-weight: 600;
  color: var(--text);
  margin-top: -10.5px;
  margin-left: 11.5px;
  display: flex;
  gap: 8.5px;
}

.user-profile-header-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-content: center;
  justify-content: center;
}

.user-profile-data {
  display: flex;
  flex-direction: column;
}

.user-profile-data {
  justify-content: center;
  gap: 35px;
}

.circular-badge {
  margin-bottom: -10px;
  margin-top: -10px;
}

.user-profile-name {
  gap: 7px;
  display: flex;
  flex-direction: column;
}

.loading-container-1 {
  min-height: 0 !important;
  margin-bottom: 50px;
  margin-top: 30px;
}

.grid-item {
  overflow: clip;
}

.react-grid-item {
  transition: all 200ms ease;
  transition-property: left, top;
}

.narrative-card p:first-letter {
  text-transform: capitalize;
}

.user-profile-badges h3 {
  margin: 0px;
  font-size: 0.8em;
  font-weight: 500;
  margin-bottom: 4px;
}

.circular-badge {
  position: relative;
  display: inline-block;
  grid-row: 1;
  grid-column: 1;
  margin-left: -9px;
  margin-right: -18px;
}

/* Light mode styles */
.circular-logo-text {
  fill: var(--circular-logo-text, #004f84);
  transition: fill 0.3s ease;
}

.user-profile .recharts-responsive-container {
  max-width: 100%;
}

.share-button-container {
  align-content: center;
  grid-column: 3;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.8em;
}

.toggle-switch {
  display: none;
}

.user-profile-activity {
  text-transform: capitalize;
  align-content: center;
  justify-content: center;
  display: flex;
  flex-direction: column;
  padding: 8px 0px;
}

tspan {
  font-family: articulat-cf;
}

.dark-mode tspan {
  fill: white;
  opacity: 0.5;
}

.user-profile-score {
  align-content: center;
  justify-content: center;
  display: flex;
  flex-direction: column;
}

.user-profile-data-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  grid-row: 2;
  grid-column: 2;
  font-size: 0.8em;
}

.dark-mode rect {
  stroke: #2c2c2c !important;
  stroke-width: 5px !important;
}

.recharts-surface {
  stroke-width: 0.3px;
}

.recharts-cartesian-axis-ticks {
  font-size: 0.7em;
}

.text-sm.text-gray-500.text-center.mt-4 {
  text-align: center;
  padding-top: 10px;
  font-size: 0.8em;
  opacity: 0.5;
}

.user-profile-header-rechart {
  align-items: center;
  display: flex;
  grid-row: 1;
  justify-content: center;
  margin: 0 auto;
  max-height: 130px;
  max-width: 200px;
  padding: 1rem;
  width: 100%;
  grid-column: 3;
  scale: 0.9;
}

.score-gauge {
  margin-right: 10px !important;
}

.user-profile-main {
  display: flex;
  flex-direction: column;
  grid-row: 1;
  justify-content: space-evenly;
  padding-top: 5px;
  grid-column: 2;
  max-width: 240px;
}

.user-profile-container {
  text-align: center;
  margin: 55px 20px 40px;
}

.user-profile-age h2 {
  font-size: 0.8em;
}

.compare-button-container {
  align-content: center;
  grid-row: 3;
}

.max-score {
  opacity: 0.5;
}

.comparea-button-profile {
  background: gray;
}

.user-profile-emoji-group {
  display: inline-grid;
  font-size: 1.8em;
  align-content: center;
  justify-content: center;
  row-gap: 10px;
  column-gap: 20px;
  margin-left: 10px;
  grid-column: 1;
  grid-row: 2;
}

.emoji-1 {
  grid-column: 1;
  grid-row: 1;
}

.emoji-2 {
  grid-column: 2;
  grid-row: 1;
}

.emoji-3 {
  grid-column: 1;
  grid-row: 2;
}

.emoji-4 {
  grid-column: 2;
  grid-row: 2;
}

.narrative-card {
  font-size: 0.9em;
}

.narrative-disclaimer {
  font-size: 0.8em;
  margin-top: 13.5px;
  opacity: 0.5;
}

.post-type-card .recharts-surface {
  margin-left: -15px;
}

.score-breakdown-card .disclaimer {
  margin-left: 3px;
}

.user-profile-container {
  margin: auto;
    margin-top: auto;
    margin-bottom: auto;
  width: 100%;
  margin-top: 60px;
  margin-bottom: 60px;
}

.profile-sections-wrapper {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 20px;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}

/* Left Section */
.profile-section.left-section {
  justify-self: start;
  margin-right: 31.1px;
  margin-top: 15.3px;
}

/* Middle Section */
.profile-section.middle-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 17px;
  justify-self: center;
  margin-right: -31.3px;
  margin-top: 11.5px;
}

.user-profile-header-rechart {
  margin: 0 auto;
  max-width: 200px;
  width: 100%;
  scale: 1.07;
  margin-top: 4px;
}

.user-profile-data-group {
  text-align: center;
  width: 100%;
  max-width: 300px;
  gap: 10px;
}

.share-button-container {
  width: 100%;
  text-align: center;
  display: block;
}

.comparea-button-profile {
  margin-top: 10px;
}

/* Right Section */
.profile-section.right-section {
  justify-self: end;
  padding-left: 32.6px;
  scale: 0.9;
}

.user-profile-main {
  text-align: center;
  gap: 22.5px;
}

.user-profile-activity {
  align-content: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0px;
  text-transform: capitalize;
}

.user-profile-badges {
  font-size: 1.2em;
  line-height: 1.2em;
}

.context-line p {
  margin: 0px;
  font-size: 0.7em;
  opacity: 0.5;
}

.bluesky-link {
  font-size: 0.8em;
  text-decoration: underline;
}

.user-profile-data-group p {
  margin: 2px;
}

.user-profile-name h2 {
  font-size: 1em;
  margin: 0px;
}

.user-profile-age h2 {
  font-size: .8em;
  margin: 0px;
}

.circular-badge {
  margin: 0px
}

.card .disclaimer {
  margin: 0px;
    margin-top: 0px;
  margin-top: 12.3px;
  max-width: 400px;
}

.learn-more-text {
  font-size: 0.9em
}

.score-breakdown-container .disclaimer {
  margin-left: 3px;
}

/* Responsive Adjustments for Cards */
@media (max-width: 835px) {

  .user-profile-container {
    margin: 30px auto;
      margin-top: 30px;
    width: 100%;
    margin-top: 40px;
  }

  .profile-sections-wrapper {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 27px;
  }

  .profile-section.left-section {
    justify-self: center;
    padding-left: 0;
    scale: .7;
    grid-column: 1;
    grid-row: 1;
  }

  .profile-section.left-section {
    margin-right: 0px;
  }

  .profile-section.right-section {
    justify-self: center;
    padding-left: 0;
    grid-column: 1;
    grid-row: 3;
    margin-top: -10px;
  }

  .user-profile-main {
    text-align: center;
  }

  .circular-badge {
    grid-column: 1;
    grid-row: 1;
    margin-left: 0;
    margin-right: 1.5px;
  }
  .user-profile-emoji-group {
    grid-row: 1;
    grid-column: 1;
    display: none;
  }
  .user-profile-main {
    grid-row: 2;
    grid-column: 1;
    gap: 20.8px;
  }
  .user-profile-header-rechart {
    grid-row: 3;
    grid-column: 1;
    scale: 0.9;
    margin-bottom: 5px;
  }

  .user-profile-data-group {
    grid-row: 4;
    grid-column: 1;
  }

  .share-button-container {
    gap: 10px;
  }

  .user-profile-score {
    padding: 0px;
  }

  .share-button-container {
    grid-row: 5;
    grid-column: 1;
    text-align: center;
  }

  .user-profile-header {
    margin-left: 0px;
    row-gap: 10px;
  }
  .user-profile-data-group {
    text-align: center;
  }

  .share-button-container {
    text-align: center;
  }

  .profile-section.left-section {
    scale: 0.6;
    margin-top: -64.5px;
  }

  .profile-section.middle-section {
    margin-top: -85.7px;
    gap: 13.5px;
    grid-column: 1;
    grid-row: 2;
    margin-right: 0px;
  }

  .user-profile-badges {
    margin-top: 0px;
  }

  .text-center.font-semibold.mt-2 {
    font-size: 1.5em;
  }

}

@media (max-width: 440px) {
  .score-breakdown-card .disclaimer {
    font-size: .7em !important;
    margin: 0px;
    margin-top: 0px;
    max-width: 300px;
  }
}