/* Employee Profile
 *
 * This sheet intentionally owns only the profile surface. It keeps the
 * profile photo visually prominent without changing the fixed app header,
 * navigation, or Chat composer contracts in styles.css.
 */

.profile-hero {
  display: grid;
  justify-items: center;
  gap: 0;
  margin: 14px 20px 0;
  padding: 22px 20px 18px;
  border-radius: 24px;
}

.profile-avatar-trigger {
  display: grid;
  place-items: center;
  width: 144px;
  height: 144px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: zoom-in;
}

.profile-avatar-trigger > .avatar.default-user,
.profile-hero > .avatar.default-user {
  width: 132px;
  height: 132px;
  min-width: 132px;
  min-height: 132px;
  margin: 0;
  border-radius: 50%;
}

.profile-avatar-trigger:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

.profile-hero h1,
.profile-hero .profile-role-venue {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.profile-hero h1 {
  margin: 13px 0 4px;
  line-height: 1.08;
}

.profile-hero .profile-role-venue {
  font-size: 0.86rem;
  font-weight: 760;
  line-height: 1.35;
}

.profile-actions,
.profile-photo-actions {
  display: flex;
  justify-content: center;
  width: 100%;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-actions {
  margin-top: 16px;
}

.profile-photo-actions {
  margin-top: 10px;
}

.profile-action-button,
.profile-photo-button,
.profile-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(90, 23, 24, 0.18);
  border-radius: 14px;
  color: var(--brand);
  background: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 850;
  text-align: center;
  cursor: pointer;
}

.profile-action-button:hover,
.profile-action-button:active,
.profile-photo-button:hover,
.profile-photo-button:active,
.profile-upload-button:hover,
.profile-upload-button:active {
  color: #fff;
  background: var(--brand);
}

.profile-action-button:focus-visible,
.profile-photo-button:focus-visible,
.profile-upload-button:focus-visible,
.profile-photo-preview header button:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.profile-photo-button.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  background: transparent;
}

.profile-photo-button.ghost:hover,
.profile-photo-button.ghost:active {
  color: var(--brand);
  background: #fff;
}

.profile-edit-panel {
  width: min(100%, 420px);
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.profile-edit-panel > p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  line-height: 1.38;
}

.profile-details {
  margin: 12px 20px 0;
  padding: 0;
}

.profile-details dl {
  margin: 0;
  border-top: 1px solid rgba(90, 23, 24, 0.13);
}

.profile-details dl > div {
  display: grid;
  grid-template-columns: minmax(76px, 0.42fr) minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  min-height: 52px;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(90, 23, 24, 0.1);
}

.profile-details dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 820;
}

.profile-details dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 780;
  overflow-wrap: anywhere;
  text-align: right;
}

.profile-details a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.profile-documents {
  margin: 16px 20px 0;
  padding: 14px 0 0;
  border-top: 1px solid rgba(90, 23, 24, 0.13);
}

.profile-documents h2,
.profile-documents p {
  margin: 0;
}

.profile-documents h2 {
  color: var(--ink);
  font-size: 0.9rem;
}

.profile-documents p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.profile-documents .profile-upload-button {
  width: 100%;
  margin-top: 10px;
  background: rgba(90, 23, 24, 0.055);
}

.system-modal-backdrop.profile-photo-preview-backdrop {
  z-index: 160;
}

.system-modal.profile-photo-preview {
  width: min(calc(100vw - 40px), 520px);
  max-height: calc(100dvh - 40px);
  padding: 12px;
  gap: 10px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(20, 6, 8, 0.18);
}

.profile-photo-preview header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 10px;
}

.profile-photo-preview header strong {
  min-width: 0;
  color: var(--ink);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.profile-photo-preview header button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  color: var(--brand);
  background: rgba(90, 23, 24, 0.08);
  font: inherit;
  font-size: 1.35rem;
  cursor: pointer;
}

.profile-photo-preview-image {
  display: grid;
  place-items: center;
  min-height: min(52dvh, 360px);
  overflow: hidden;
  border: 1px solid rgba(90, 23, 24, 0.1);
  border-radius: 18px;
  background: rgba(90, 23, 24, 0.035);
}

.profile-photo-preview-image .avatar.default-user {
  width: min(100%, 420px);
  height: min(58dvh, 420px);
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.profile-photo-preview-image .avatar.default-user img {
  object-fit: contain;
  border-radius: 0;
  background: rgba(90, 23, 24, 0.035);
}

@media (max-width: 359px) {
  .profile-hero {
    margin-inline: 14px;
    padding-inline: 16px;
  }

  .profile-details,
  .profile-documents {
    margin-inline: 14px;
  }

  .profile-avatar-trigger {
    width: 132px;
    height: 132px;
  }

  .profile-avatar-trigger > .avatar.default-user,
  .profile-hero > .avatar.default-user {
    width: 120px;
    height: 120px;
    min-width: 120px;
    min-height: 120px;
  }
}
