/* Profile view (views/profile/profile.js) */

/* Photo beside the data, as tall as the data (at least 4:5); no Bootstrap grid: the layout removes nested column padding */
.profile-view .profile-main {
  display: flex;
  gap: var(--spacing-lg);
  align-items: stretch;
  margin-bottom: var(--spacing-lg);
}

.profile-view .profile-photo-box {
  flex: 0 0 140px;
  position: relative;
  min-height: 175px;
}

.profile-view .profile-main .profile-fields {
  margin-bottom: 0;
}

.profile-view .profile-data {
  flex: 1 1 auto;
  min-width: 0;
}

/* The data sets the height: the photo fills its box, cropped */
.profile-view .profile-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.profile-view .profile-photo-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--news-bg-light);
  border: 1px solid var(--color-border);
  color: var(--color-text-light);
  font-size: 4rem;
}

.profile-view .profile-fields {
  display: grid;
  grid-template-columns: minmax(8rem, max-content) 1fr;
  gap: var(--spacing-xs) var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.profile-view .profile-fields dt {
  font-weight: 600;
  color: var(--color-text-light);
}

.profile-view .profile-fields dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.profile-view .profile-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold-blue);
  border-bottom: 2px solid var(--gold-yellow);
  padding-bottom: var(--spacing-xs);
  margin: var(--spacing-md) 0 var(--spacing-sm);
}

.profile-view .profile-text {
  white-space: pre-line;
  margin-bottom: var(--spacing-md);
}

.profile-view .profile-text img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 575.98px) {
  .profile-view .profile-main {
    flex-direction: column;
    align-items: center;
  }

  .profile-view .profile-photo-box {
    flex-basis: auto;
    width: 140px;
    height: 175px;
  }

  .profile-view .profile-data {
    width: 100%;
  }
}

/* ProfileEditorModal.js: the photo shown above "Cambia foto" */
.profile-editor-photo {
  max-width: 80px;
  max-height: 100px;
}

.profile-editor-photo-empty {
  font-size: 3rem;
}
