/* profile */




.profile-main-content{
  display: flex;
  flex-direction: column;
  width: 100%;
  flex-wrap: wrap;
  align-items: center

}


.profile-info {
  
  margin-bottom: 10px;
  margin-top: 10px;
  padding: 10px;
  background-color: #fafafa;
  /* max-width: 1200px; */
  width: 100%;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: space-between;
}

.user-results,
.page__header{
  background-color: #fafafa;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  margin-bottom: 30px;
  margin-top: 20px;
}
.profile-content-wrapper {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 3fr);
  align-items: start;
  gap: 16px;
  width: 100%;
  transition: grid-template-columns 0.4s ease, column-gap 0.4s ease,
    row-gap 0.4s ease;
}

.profile-panel__controls {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.profile-details {
  min-width: 0;
  background-color: #ffffff;
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.profile-details:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.profile-progress {
  min-width: 0;
  min-height: 0;
  max-height: 800px;
  overflow: hidden;
  background-color: #fdfdfd;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.25s ease,
    transform 0.4s ease, box-shadow 0.22s ease;
}

.profile-progress:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.profile-details__identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.profile-details__identity .profile-info__name {
  flex: 1;
}

.profile-details__body {
  max-height: 1000px;
  margin-top: 16px;
  overflow: hidden;
  opacity: 1;
  transition: max-height 0.4s ease, margin-top 0.4s ease, opacity 0.25s ease,
    transform 0.4s ease;
}

.profile-content-wrapper.is-collapsed {
  grid-template-columns: minmax(0, 1fr);
  column-gap: 0;
  row-gap: 12px;
}

.profile-content-wrapper.is-collapsed .profile-details__body {
  max-height: 0;
  margin-top: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}

.profile-content-wrapper.is-collapsed .profile-progress {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}

.profile-progress__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.profile-progress__header .profile-info-title {
  min-width: 0;
  margin: 0;
  padding: 0;
}

@media (max-width: 1000px) {
  .profile-content-wrapper {
    grid-template-columns: minmax(0, 1fr);
  }
}

.profilepicture {
  border-radius: 50%;
  flex: 0 0 80px;
  border: 3px solid #e0e0e0;
  width: 80px;
  height: 80px;
  margin: 0;
  object-fit: cover;
  cursor: pointer;
  transition: width 0.4s ease, height 0.4s ease, flex-basis 0.4s ease,
    transform 0.2s ease, box-shadow 0.2s ease;
}

.profilepicture:hover {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transform: scale(1.04);
}

.profile-content-wrapper.is-collapsed .profilepicture {
  flex-basis: 48px;
  width: 48px;
  height: 48px;
}

.profile-text-details {
  width: 100%;
}

.profile-info-title.profile-info__name {
  min-width: 0;
  margin: 0;
  padding: 0;
  font-size: clamp(20px, 2.2vw, 27px);
  line-height: 1.15;
  font-weight: 600;
  color: #333;
  overflow-wrap: anywhere;
  transition: font-size 0.4s ease;
}

.profile-content-wrapper.is-collapsed .profile-info-title.profile-info__name {
  font-size: 18px;
}

.profile-info-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    /* border-bottom: 2px solid #007bff; */
    padding-bottom: 10px;
}

.profile-info-text {
  font-size: 16px;
  margin-bottom: 12px;
  color: #555;
  background-color: #f9f9f9;
  border-left: 4px solid #28a745;
  padding: 10px 15px;
  border-radius: 5px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  column-gap: 10px;
  row-gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.profile-info-text:hover {
  box-shadow: 0 3px 10px rgba(32, 72, 48, 0.12);
  transform: translateY(-1px);
}

.profile-info-text strong {
  grid-column: 2;
  font-weight: 600;
  color: #333;
  min-width: 0;
}

.profile-info-text > span {
  grid-column: 2;
  min-width: 0;
  overflow-wrap: anywhere;
}

.profile-results-empty {
  padding: 14px;
  border: 1px dashed #cbd5ce;
  border-radius: 10px;
  background-color: #f8fbf8;
  color: #536158;
  text-align: center;
}

.profile-results-empty[hidden],
.user-results .result-item[hidden] {
  display: none !important;
}

.profile-info-text::before {
  grid-column: 1;
  grid-row: 1 / span 2;
  font-size: 20px;
  margin-right: 0;
  text-align: center;
  color: #28a745;
}

.profile-info__email::before {
  content: '📧';
}

.profile-info__email {
  border-left-color: #3182ce;
  background-color: #e4efff;
  color: #26384d;
}

.profile-info__email::before {
  color: #2874bd;
}

.profile-info__educationOrg::before {
  content: '🏫';
}

.profile-info__roles::before {
  content: '👨‍💻';
}

.profile-info__group::before {
  content: '👥';
}

.profile-info__group {
  border-left-color: #218838;
  background-color: #e1f1e5;
  color: #294331;
}

.profile-info__group::before {
  color: #1d7a33;
}

.profile-info__passedTests::before {
  content: '✅';
}

/* Progress Bar Styles */
.progress-bars-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.progress-bars-container::-webkit-scrollbar {
  width: 8px;
}

.progress-bars-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.progress-bars-container::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

.progress-bars-container::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.subject-progress {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e2e2e2;
    background-color: #fafafa;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.subject-progress:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.subject-progress-info {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 12px;
    row-gap: 6px;
    margin-bottom: 6px;
    font-size: 14px;
    color: #333;
}

.subject-name {
    font-weight: 600;
    min-width: 0;
    overflow-wrap: anywhere;
}

.subject-stats {
    font-weight: 600;
    color: #6b6b6b;
    white-space: nowrap;
    justify-self: end;
}

.progress-bar-container {
    width: 100%;
    background-color: #e9ecef;
    border-radius: 6px;
    height: 14px;
    overflow: hidden;
    margin-top: 4px;
}

@media (max-width: 520px) {
  .subject-progress-info {
    grid-template-columns: 1fr;
  }
  .subject-stats {
    justify-self: start;
  }
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #1e7e34);
    border-radius: 6px;
    transition: width 0.5s ease-in-out;
    text-align: center;
    color: white;
    font-size: 12px;
    line-height: 14px;
}


.profile-info__buttons {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  width: 100%;
}

button:not(.close-popup):not(.admin-page__timer-button):not(.admin-page__count-button).logout-button {
  width: 100%;
}

.profile-info-button {
  cursor: pointer;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  transition: background-color 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
}

.profile-info-button--primary {
  color: #fff;
  background-color: #28a745;
}

.profile-info-button--primary:hover {
  background-color: #218838;
}

.profile-info-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

button:not(.close-popup):not(.admin-page__timer-button):not(.admin-page__count-button).profile-info-button {
  transition: background-color 0.2s ease, border-color 0.2s ease,
    transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-info-button:hover {
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.profile-info-button:active {
  transform: translateY(0) scale(0.98);
}

.logout-button {
  color: #fff;
  background-color: #db616d;
}

.logout-button:hover {
  background-color: #c82333;
}

.hide-button {
  background-color: #90aac0;
  margin-right: 0;
  color: #fff;
}

.hide-button:hover {
  background-color: #697b8b;
}


.change-accaunt-button {
  background-color: #e9d735;
  margin-right: 10px;
}

.change-accaunt-button:hover {
  background-color: #fae41d;
}

@media (max-width: 520px) {
  .profile-details,
  .profile-progress {
    padding: 14px;
  }

  .profile-details__identity {
    gap: 10px;
  }

  .profilepicture {
    flex-basis: 68px;
    width: 68px;
    height: 68px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-content-wrapper,
  .profile-details,
  .profile-details__body,
  .profile-progress,
  .profilepicture,
  .profile-info-title.profile-info__name,
  .profile-info-text,
  .subject-progress,
  .profile-info-button {
    transition: none;
  }

  .profile-details:hover,
  .profile-progress:hover,
  .profilepicture:hover,
  .profile-info-text:hover,
  .subject-progress:hover,
  .profile-info-button:hover,
  .profile-info-button:active {
    transform: none;
  }
}
