/* Avatar + modal reutilizáveis (candidato e empresa) */

.profile-hero__avatar-wrap.profile-hero__avatar-trigger {
    position: relative;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.profile-hero__avatar-wrap.profile-hero__avatar-trigger:focus-visible {
    outline: 2px solid var(--brand, #00d66f);
    outline-offset: 4px;
}

.profile-hero__avatar-wrap .profile-hero__placeholder,
.profile-hero__avatar-wrap .profile-avatar-widget__preview,
.profile-hero__avatar-wrap .profile-photo-preview,
.profile-hero__avatar-wrap .empresa-config-logo-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    box-sizing: border-box;
}

.profile-hero__avatar-wrap .profile-hero__placeholder[hidden],
.profile-hero__avatar-wrap .profile-avatar-widget__preview[hidden],
.profile-hero__avatar-wrap .profile-photo-preview[hidden],
.profile-hero__avatar-wrap .empresa-config-logo-preview[hidden] {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
}

.profile-avatar-widget--rounded {
    border-radius: 20px;
}

.profile-avatar-widget--rounded .profile-hero__placeholder,
.profile-avatar-widget--rounded .empresa-config-logo-preview {
    border-radius: 20px;
}

.profile-photo-modal {
    border: none;
    border-radius: 16px;
    padding: 0;
    max-width: min(420px, 94vw);
    width: 100%;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.22);
}

.profile-photo-modal::backdrop {
    background: rgba(15, 23, 42, 0.55);
}

.profile-photo-modal__content {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.profile-photo-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}

.profile-photo-modal__header h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
}

.profile-photo-modal__close {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: var(--surface-hover);
    color: var(--ink);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.profile-photo-modal__close:hover {
    background: rgba(0, 214, 111, 0.14);
}

.profile-photo-modal__body {
    padding: 20px 18px 12px;
    text-align: center;
}

.profile-photo-modal__preview-wrap {
    position: relative;
    width: min(280px, 72vw);
    height: min(280px, 72vw);
    margin: 0 auto 12px;
}

.profile-photo-modal__preview-wrap--rounded {
    border-radius: 24px;
}

.profile-photo-modal__image,
.profile-photo-modal__placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 50%;
    box-sizing: border-box;
}

.profile-photo-modal__image--rounded,
.profile-photo-modal__placeholder--rounded {
    border-radius: 20px;
}

.profile-photo-modal__image {
    object-fit: cover;
    border: 3px solid var(--paper);
    box-shadow: 0 8px 28px rgba(0, 214, 111, 0.18);
}

.profile-photo-modal__image--rounded {
    object-fit: contain;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.profile-photo-modal__image[hidden],
.profile-photo-modal__placeholder[hidden] {
    display: none !important;
}

.profile-photo-modal__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--surface-hover), var(--border));
    border: 3px solid var(--paper);
    font-size: 4rem;
    font-weight: 800;
    color: var(--muted);
}

.profile-photo-modal__status {
    margin: 0 0 8px;
    font-size: 0.88rem;
}

.profile-photo-modal__status:not([hidden]) {
    display: block;
}

.profile-photo-modal__status.error {
    color: var(--danger, #c62828);
}

.profile-photo-modal__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 12px 18px 18px;
}

.profile-photo-modal__footer .btn {
    min-width: 140px;
}

.profile-photo-modal__remove:not([hidden]) {
    display: inline-flex;
}
