/* =====================================================
   CONNECTCLICK ULTIMATE PROFILE V1.0
   Classic Windows Retro Interface
===================================================== */

.profile-shell {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px 20px 50px;

  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 20px;

  align-items: start;
}

.profile-main-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

/* =====================================================
   SIDEBAR
===================================================== */

.profile-sidebar-logout {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--win-dark);
}

.profile-sidebar-logout button {
  width: 100%;
  cursor: pointer;
  color: var(--win-danger);
}

.profile-sidebar-logout i {
  color: var(--win-danger);
}

.profile-sidebar-info {
  margin-top: 15px;
}

.profile-sidebar-info-body {
  padding: 12px;
  font-size: 12px;
  line-height: 1.6;
}

.profile-sidebar-info-body p {
  margin: 5px 0;
}

.profile-sidebar-info-body span {
  display: block;
  color: var(--win-darker);
  font-size: 10px;
  margin-top: 10px;
}


/* =====================================================
   PROFILE COVER
===================================================== */

.profile-header-window {
  overflow: hidden;
}

.profile-cover-box {
  position: relative;
  height: 235px;

  background:
    linear-gradient(135deg, #001b55, #007c91 55%, #5a65a9);

  border-bottom: 2px solid var(--win-dark);

  background-size: cover;
  background-position: center;

  overflow: hidden;
}

.profile-cover-box::after {
  content: "";
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      to bottom,
      transparent 45%,
      rgba(0, 0, 0, 0.35)
    );

  pointer-events: none;
}

.profile-cover-overlay {
  position: absolute;
  bottom: 12px;
  right: 14px;
  z-index: 1;

  color: white;
  font-size: 11px;

  text-shadow: 1px 1px 3px black;
}

.profile-cover-overlay i {
  margin-right: 5px;
}


/* =====================================================
   PROFILE HEADER BODY
===================================================== */

.profile-header-body {
  padding: 0 20px 18px;
  background: var(--win-grey);
}

.profile-top-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  gap: 14px;
  flex-wrap: wrap;

  margin-top: -58px;
  margin-bottom: 15px;

  position: relative;
  z-index: 2;
}


/* =====================================================
   AVATAR
===================================================== */

.profile-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar-frame {
  width: 116px;
  height: 116px;

  display: flex;
  justify-content: center;
  align-items: center;

  background: var(--win-teal);
  color: white;

  font-size: 36px;
  font-weight: bold;

  border-top: 4px solid var(--win-white);
  border-left: 4px solid var(--win-white);
  border-right: 4px solid var(--win-darker);
  border-bottom: 4px solid var(--win-darker);

  box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.4);

  overflow: hidden;
}

.profile-avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-online-indicator {
  position: absolute;

  width: 18px;
  height: 18px;

  right: 5px;
  bottom: 5px;

  background: #999;
  border: 3px solid var(--win-grey);

  border-radius: 50%;
}

.profile-online-indicator.online {
  background: #20c45a;
}

.profile-online-indicator.offline {
  background: #888;
}


/* =====================================================
   ACTION BUTTONS
===================================================== */

.profile-action-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;

  flex-wrap: wrap;
  gap: 8px;

  padding-bottom: 5px;
}

.profile-action-buttons .win-btn {
  min-height: 34px;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
}

.profile-action-buttons button:disabled {
  opacity: 0.6;
  cursor: wait;
}


/* =====================================================
   PROFILE IDENTITY
===================================================== */

.profile-identity {
  margin-top: 8px;
}

.profile-name-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.profile-identity h1 {
  margin: 0;
  font-size: 25px;
  line-height: 1.3;
  color: var(--win-black);
  overflow-wrap: anywhere;
}

.profile-verified-badge {
  color: #0878d1;
  font-size: 18px;
}

.profile-handle {
  margin-top: 3px;
  margin-bottom: 8px;

  font-size: 13px;
  color: var(--win-navy);
  font-weight: bold;
}

.profile-headline {
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 7px;
  color: var(--win-darker);
}

.profile-bio {
  max-width: 750px;

  font-size: 14px;
  line-height: 1.6;

  white-space: pre-wrap;
  overflow-wrap: anywhere;

  margin: 8px 0 12px;
  color: var(--win-black);
}

.profile-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;

  margin: 12px 0;

  font-size: 12px;
}

.profile-meta-strip span,
.profile-meta-strip a {
  display: inline-flex;
  align-items: center;
  gap: 5px;

  color: var(--win-darker);
  text-decoration: none;
}

.profile-meta-strip a:hover {
  color: var(--win-navy);
  text-decoration: underline;
}

.profile-presence-text {
  margin-top: 8px;
  font-size: 11px;
  color: var(--win-darker);
}

.profile-presence-text:empty {
  display: none;
}


/* =====================================================
   PROFILE STATISTICS
===================================================== */

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;

  margin-top: 18px;
}

.profile-stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 4px;

  min-width: 0;
  padding: 12px 8px;

  background: var(--win-white);

  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);

  cursor: pointer;
  font-family: inherit;
}

.profile-stat-box:hover {
  background: #ffffe8;
}

.profile-stat-box:active {
  border-top-color: var(--win-dark);
  border-left-color: var(--win-dark);
  border-right-color: var(--win-white);
  border-bottom-color: var(--win-white);
}

.profile-stat-icon {
  font-size: 14px;
  color: var(--win-teal);
}

.profile-stat-num {
  font-size: 21px;
  font-weight: bold;
  color: var(--win-navy);
}

.profile-stat-label {
  font-size: 11px;
  color: var(--win-darker);
}


/* =====================================================
   CONTENT WINDOW
===================================================== */

.profile-content-window {
  min-width: 0;
  overflow: hidden;
}

.profile-content-version {
  font-size: 10px;
  font-weight: normal;
  opacity: 0.8;
}

.profile-tabs-wrapper {
  background: var(--win-grey);
  border-bottom: 1px solid var(--win-dark);
}

.profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;

  padding: 7px 8px 0;
}

.profile-tabs .feed-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 9px 12px;

  font-size: 12px;
  white-space: nowrap;
}

.profile-tab-content {
  min-height: 200px;
  padding: 15px;
  background: var(--win-grey);
}

.profile-window-date {
  font-size: 10px;
  font-weight: normal;
}


/* =====================================================
   POSTS
===================================================== */

.profile-post-card {
  margin-bottom: 14px;
  padding: 13px;

  background: var(--win-white);

  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
}

.profile-post-header {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.profile-post-author {
  font-size: 12px;
  font-weight: bold;
}

.profile-post-time {
  display: block;
  margin-top: 3px;

  font-size: 10px;
  color: var(--win-darker);
}

.profile-post-content {
  font-size: 13px;
  line-height: 1.6;

  white-space: pre-wrap;
  overflow-wrap: anywhere;

  margin: 10px 0;
}

.profile-post-image {
  display: block;
  width: 100%;
  max-height: 450px;

  object-fit: contain;

  margin-top: 10px;
  background: #111;
}


/* =====================================================
   PHOTO GALLERY
===================================================== */

.profile-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.profile-photo-tile {
  position: relative;
  overflow: hidden;

  aspect-ratio: 1 / 1;

  background: var(--win-black);

  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
}

.profile-photo-tile img {
  width: 100%;
  height: 100%;
  display: block;

  object-fit: cover;

  transition: transform 0.2s ease;
}

.profile-photo-tile:hover img {
  transform: scale(1.06);
}


/* =====================================================
   CONNECTIONS
===================================================== */

.connections-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.user-row-card {
  display: flex;
  align-items: center;
  gap: 10px;

  min-width: 0;
  padding: 10px;

  background: var(--win-white);
  border: 1px solid var(--win-dark);

  color: var(--win-black);
  text-decoration: none;

  font-size: 12px;
}

.user-row-card:hover {
  background: #ffffe8;
  border-color: var(--win-navy);
}

.user-row-card span {
  overflow-wrap: anywhere;
}


/* =====================================================
   ABOUT SECTION
===================================================== */

.profile-about-section {
  margin-bottom: 15px;

  background: var(--win-white);

  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
}

.profile-about-title {
  padding: 9px 12px;

  background: var(--win-navy);
  color: white;

  font-size: 12px;
  font-weight: bold;
}

.profile-about-list {
  padding: 10px 12px;
}

.profile-about-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(0, 1.5fr);
  gap: 10px;

  padding: 9px 0;

  border-bottom: 1px solid #ddd;
  font-size: 12px;
}

.profile-about-row:last-child {
  border-bottom: none;
}

.profile-about-label {
  color: var(--win-darker);
  font-weight: bold;
}

.profile-about-value {
  overflow-wrap: anywhere;
  color: var(--win-black);
}


/* =====================================================
   EMPTY STATES
===================================================== */

.profile-empty-state {
  text-align: center;
  padding: 40px 15px;

  color: var(--win-darker);
  font-size: 13px;
}

.profile-empty-state i {
  display: block;
  margin-bottom: 12px;

  font-size: 28px;
  color: var(--win-teal);
}


/* =====================================================
   EDIT MODAL
===================================================== */

.profile-edit-modal {
  width: calc(100% - 24px);
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
}

.profile-edit-body {
  padding: 16px;
}

.profile-edit-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.profile-edit-upload-grid input {
  width: 100%;
  max-width: 100%;
  font-size: 11px;
}

.profile-edit-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}


/* =====================================================
   FOOTER
===================================================== */

.profile-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;

  padding: 10px 4px;

  font-size: 10px;
  color: var(--win-darker);
}


/* =====================================================
   RESPONSIVE TABLET
===================================================== */

@media (max-width: 1000px) {

  .profile-shell {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 12px;
  }

  .profile-cover-box {
    height: 190px;
  }

  .profile-avatar-frame {
    width: 100px;
    height: 100px;
  }

}


/* =====================================================
   RESPONSIVE MOBILE
===================================================== */

@media (max-width: 760px) {

  .profile-shell {
    display: block;
    padding: 12px 10px 85px;
  }

  .left-sidebar-col {
    display: none;
  }

  .profile-main-col {
    gap: 13px;
  }

  .profile-cover-box {
    height: 150px;
  }

  .profile-header-body {
    padding: 0 12px 14px;
  }

  .profile-top-row {
    margin-top: -48px;
    gap: 10px;
  }

  .profile-avatar-frame {
    width: 92px;
    height: 92px;
    font-size: 28px;
  }

  .profile-action-buttons {
    padding-top: 55px;
    justify-content: flex-start;
  }

  .profile-action-buttons .win-btn {
    font-size: 11px;
    padding: 7px 9px;
  }

  .profile-identity h1 {
    font-size: 21px;
  }

  .profile-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .profile-stat-box {
    padding: 10px 5px;
  }

  .profile-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .profile-tabs .feed-tab-btn {
    flex-shrink: 0;
  }

  .profile-tab-content {
    padding: 10px;
  }

  .profile-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .connections-grid {
    grid-template-columns: 1fr;
  }

}


/* =====================================================
   SMALL MOBILE
===================================================== */

@media (max-width: 420px) {

  .profile-cover-box {
    height: 125px;
  }

  .profile-avatar-frame {
    width: 80px;
    height: 80px;
  }

  .profile-action-buttons {
    gap: 5px;
  }

  .profile-action-buttons .win-btn {
    font-size: 10px;
    padding: 6px 7px;
  }

  .profile-meta-strip {
    gap: 8px;
  }

  .profile-about-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .profile-edit-upload-grid {
    grid-template-columns: 1fr;
  }

}

/* =====================================================
   PROFILE LEVEL & XP PANEL
===================================================== */

.profile-progress-panel {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--win-white);
  border-top: 2px solid var(--win-white);
  border-left: 2px solid var(--win-white);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  color: var(--win-black);
}

.profile-progress-panel[hidden] {
  display: none !important;
}

.profile-progress-heading,
.profile-xp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-progress-title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--win-navy);
  font-size: 11px;
  font-weight: bold;
}

.profile-progress-title i {
  color: var(--win-teal);
}

.profile-progress-caption {
  font-size: 9px;
  color: var(--win-darker);
}

.profile-progress-main {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}

.profile-level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 7px 8px;
  background: var(--win-navy);
  color: white;
  border-top: 2px solid #8096c5;
  border-left: 2px solid #8096c5;
  border-right: 2px solid #111b3d;
  border-bottom: 2px solid #111b3d;
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
}

.profile-progress-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.profile-progress-details strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.profile-progress-details span {
  color: var(--win-darker);
  font-size: 11px;
}

.profile-xp-track {
  height: 15px;
  padding: 2px;
  background: #fff;
  border-top: 2px solid var(--win-dark);
  border-left: 2px solid var(--win-dark);
  border-right: 2px solid var(--win-white);
  border-bottom: 2px solid var(--win-white);
  overflow: hidden;
}

.profile-xp-fill {
  width: 0;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    #008080 0,
    #008080 10px,
    #00a0a0 10px,
    #00a0a0 12px
  );
}

.profile-xp-footer {
  margin-top: 6px;
  color: var(--win-darker);
  font-size: 10px;
}

.profile-inline-level-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 6px;
  background: #008080;
  color: #fff;
  border: 1px solid #004d4d;
  font-size: 10px;
  font-weight: bold;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 420px) {
  .profile-progress-panel {
    padding: 10px;
  }

  .profile-progress-caption {
    display: none;
  }

  .profile-xp-footer {
    font-size: 9px;
  }
}

/* =====================================================
   PERSONAL HOMEPAGE PROFILE BUTTON
===================================================== */

#profileActionButtons a[href*="homepage.html"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
}

#profileActionButtons a[href*="homepage.html"] i {
  font-size: 13px;
}

#profileActionButtons a[href*="homepage.html"]:hover {
  filter: brightness(1.08);
}