/* complete-profile-prompt.css — modal "Complete seu perfil" pós-login (v5.4.0) */

.pharus-complete-profile {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 2147483647; /* max int 32-bit — fica acima de qualquer outro modal do tenant */
    align-items: flex-end;
    justify-content: center;
}

.pharus-complete-profile.open {
    display: flex;
}

.pharus-complete-profile__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    z-index: 1;
    pointer-events: auto;
}

.pharus-complete-profile__sheet {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 86vh;
    background: #fff;
    color: #111;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -4px 28px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    animation: cprofile-slide-up .25s ease-out;
    z-index: 2;
    pointer-events: auto;
    isolation: isolate;
}

/* Tudo dentro do sheet ganha pointer-events explícito pra evitar
   qualquer regra global do tenant que zere isso em descendentes. */
.pharus-complete-profile__sheet * {
    pointer-events: auto;
}

@keyframes cprofile-slide-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.pharus-complete-profile__head {
    padding: 20px 20px 8px;
}

.pharus-complete-profile__head h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: #111;
}

.pharus-complete-profile__sub {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #555;
}

.pharus-complete-profile__progress {
    padding: 8px 20px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pharus-complete-profile__progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 999px;
    overflow: hidden;
}

.pharus-complete-profile__progress-bar > span {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--color-primary, #f43f5e);
    border-radius: 999px;
    transition: width .25s ease-out;
}

.pharus-complete-profile__progress-text {
    font-size: 12px;
    color: #555;
    white-space: nowrap;
}

.pharus-complete-profile__form {
    display: contents;
}

.pharus-complete-profile__body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 20px 18px;
}

.pharus-complete-profile__question-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.35;
    color: #111;
}

.pharus-complete-profile__input,
.pharus-complete-profile__select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    background: #fff;
    font-size: 15px;
    color: #111;
    box-sizing: border-box;
}

.pharus-complete-profile__select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

/* Dropdown custom (substitui <select> nativo pra evitar popup do sistema
   que em alguns Android/iOS dispara click no body e fechava o modal). */
.pharus-complete-profile__custom-select {
    position: relative;
    width: 100%;
}

.pharus-complete-profile__custom-select__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    background: #fff;
    color: #111;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
}

.pharus-complete-profile__custom-select__trigger i {
    font-size: 12px;
    transition: transform .18s;
    flex-shrink: 0;
}

.pharus-complete-profile__custom-select.is-open .pharus-complete-profile__custom-select__trigger {
    border-color: var(--color-primary, #f43f5e);
}

.pharus-complete-profile__custom-select.is-open .pharus-complete-profile__custom-select__trigger i {
    transform: rotate(180deg);
}

.pharus-complete-profile__custom-select__list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    list-style: none;
    margin: 0;
    padding: 6px;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.12);
    z-index: 5;
    display: none;
}

.pharus-complete-profile__custom-select.is-open .pharus-complete-profile__custom-select__list {
    display: block;
}

.pharus-complete-profile__custom-select__item {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: #111;
    cursor: pointer;
    transition: background .12s;
}

.pharus-complete-profile__custom-select__item:hover,
.pharus-complete-profile__custom-select__item.is-selected {
    background: rgba(244, 63, 94, 0.08);
    color: var(--color-primary, #f43f5e);
}

.pharus-complete-profile__options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.pharus-complete-profile__option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    color: #111;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.pharus-complete-profile__option input {
    accent-color: var(--color-primary, #f43f5e);
}

.pharus-complete-profile__option:hover,
.pharus-complete-profile__option.is-checked {
    border-color: var(--color-primary, #f43f5e);
    background: rgba(244, 63, 94, 0.06);
}

.pharus-complete-profile__bool-row {
    display: flex;
    gap: 10px;
}

.pharus-complete-profile__bool-row .pharus-complete-profile__option {
    flex: 1;
    justify-content: center;
}

.pharus-complete-profile__foot {
    padding: 12px 20px 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pharus-complete-profile__nav {
    display: flex;
    gap: 8px;
}

.pharus-complete-profile__btn {
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
}

.pharus-complete-profile__btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.pharus-complete-profile__btn--ghost {
    background: transparent;
    color: #555;
    text-decoration: underline;
    padding: 10px 4px;
}

.pharus-complete-profile__btn--secondary {
    background: rgba(0, 0, 0, 0.06);
    color: #111;
}

.pharus-complete-profile__btn--primary {
    background: var(--color-primary, #f43f5e);
    color: #fff;
    min-width: 110px;
}

.pharus-complete-profile__btn--primary:active:not(:disabled) {
    transform: scale(0.98);
}

.pharus-complete-profile__error {
    margin-top: 8px;
    font-size: 12px;
    color: #dc2626;
    min-height: 16px;
}

.pharus-complete-profile__done {
    text-align: center;
    padding: 24px 8px 12px;
}

.pharus-complete-profile__done i {
    font-size: 42px;
    color: #16a34a;
    margin-bottom: 12px;
}

body.cprofile-open {
    overflow: hidden;
}
