/* ===================================================== */
/* 👤 EDIT PROFILE MODAL OVERLAY — FULL WIDTH */
/* ===================================================== */

.edit-profile-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;

    width: 100%;
    height: 100dvh;

    display: block;

    background: #0F0F0F;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.18s ease,
        visibility 0.18s ease;
}


/* ===================================================== */
/* ✅ ACTIVE */
/* ===================================================== */

.edit-profile-modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* ===================================================== */
/* 📦 MODAL — FULL WIDTH */
/* ===================================================== */

.edit-profile-modal {
    width: 100%;
    height: 100dvh;

    background: #0F0F0F;

    display: flex;
    flex-direction: column;

    -webkit-transform: translate3d(0, 100%, 0);
    -ms-transform: translate(0, 100%);
    transform: translate3d(0, 100%, 0);

    -webkit-transition:
    -webkit-transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);

    -ms-transition:
        -ms-transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);

    transition:
        transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);

    will-change: transform;
    backface-visibility: hidden;

    overflow: hidden;
}


/* ===================================================== */
/* ✅ OPEN */
/* ===================================================== */

.edit-profile-modal-overlay.is-active
.edit-profile-modal {
    -webkit-transform: translate3d(0, 0, 0);
    -ms-transform: translate(0, 0);
    transform: translate3d(0, 0, 0);
}



/* ===================================================== */
/* ♿ REDUCED MOTION                                     */
/* ----------------------------------------------------- */
/* Respeita usuários que preferem menos animações.        */
/* ===================================================== */

@media (prefers-reduced-motion: reduce) {
    .edit-profile-modal-overlay,
    .edit-profile-modal,
    .edit-profile-modal-cancel-btn,
    .edit-profile-modal-save-btn,
    .edit-profile-avatar-camera-btn,
    .edit-profile-avatar-remove-btn,
    .edit-profile-floating-label,
    .edit-profile-bio-floating-placeholder {
        transition: none;
    }
}


/* ===================================================== */
/* 🧭 HEADER — FULL WIDTH */
/* ===================================================== */

.edit-profile-modal-header {
    width: 100%;
    height: 50px;

    background: #0F0F0F;
    border-bottom: 1px solid #1B1B1B;

    flex-shrink: 0;
}


/* ===================================================== */
/* 🧭 HEADER INNER — CONTENT MAX WIDTH */
/* ===================================================== */

.edit-profile-modal-header-inner {
    width: 100%;
    max-width: 600px;
    height: 100%;

    margin: 0 auto;
    padding: 0 16px;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}


/* ===================================================== */
/* 🏷️ TITLE */
/* ===================================================== */

.edit-profile-modal-title {
    color: #F9F9F9;

    font-size: 15px;
    font-weight: 700;

    margin: 0;

    justify-self: center;
    text-align: center;
    white-space: nowrap;
}


/* ===================================================== */
/* 🔘 BUTTONS */
/* ===================================================== */

.edit-profile-modal-cancel-btn,
.edit-profile-modal-save-btn {
    border: none;
    background: transparent;

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    padding: 0;

    line-height: 1;

    -webkit-tap-highlight-color: transparent;
}


.edit-profile-modal-cancel-btn {
    color: #707070;
    justify-self: start;
}


.edit-profile-modal-save-btn {
    color: #F86418;
    justify-self: end;
}


/* ===================================================== */
/* 📄 BODY — FULL WIDTH */
/* ===================================================== */

.edit-profile-modal-body {
    flex: 1;

    width: 100%;

    overflow-y: auto;

    scrollbar-width: none;
    -ms-overflow-style: none;
}


.edit-profile-modal-body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}


/* ===================================================== */
/* 📄 BODY INNER — CONTENT MAX WIDTH */
/* ===================================================== */

.edit-profile-modal-body-inner {
    width: 100%;
    max-width: 600px;

    margin: 0 auto;

    padding: 24px 16px 120px;
}


/* ===================================================== */
/* 👤 FORM */
/* ===================================================== */

.edit-profile-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}


/* ===================================================== */
/* 🚨 GLOBAL ERROR */
/* ===================================================== */

.edit-profile-global-error {
    display: none;

    width: 100%;

    color: #FF5A5A;
    background: rgba(255, 90, 90, 0.08);

    border: 1px solid rgba(255, 90, 90, 0.18);
    border-radius: 10px;

    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;

    padding: 12px 14px;
}


.edit-profile-global-error.is-active {
    display: block;
}


/* ===================================================== */
/* ✅ GLOBAL SUCCESS */
/* ===================================================== */

.edit-profile-global-success {
    display: none;

    width: 100%;

    color: #22C55E;
    background: rgba(34, 197, 94, 0.08);

    border: 1px solid rgba(34, 197, 94, 0.18);
    border-radius: 10px;

    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;

    padding: 12px 14px;
}


.edit-profile-global-success.is-active {
    display: block;
}


/* ===================================================== */
/* 👤 AVATAR SECTION */
/* ===================================================== */

.edit-profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;

    padding-top: 8px;
}


/* ===================================================== */
/* 🖼️ AVATAR WRAPPER */
/* ===================================================== */

.edit-profile-avatar-wrapper {
    position: relative;

    width: 95px;
    height: 95px;

    flex-shrink: 0;
}


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

.edit-profile-avatar-image {
    width: 100%;
    height: 100%;

    object-fit: cover;

    border-radius: 50%;

    display: block;

    background: #1B1B1B;
}


/* ===================================================== */
/* 📸 CAMERA BUTTON */
/* ===================================================== */

.edit-profile-avatar-camera-btn {
    position: absolute;
    right: -6px;
    bottom: -2px;

    width: 40px;
    height: 40px;

    border-radius: 50%;

    background: #1B1B1B;
    border: 2px solid #464646;

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

    cursor: pointer;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;

    -webkit-tap-highlight-color: transparent;
}


.edit-profile-avatar-camera-btn:hover {
    transform: scale(1.04);
    border-color: #5A5A5A;
}


/* ===================================================== */
/* 📸 CAMERA ICON */
/* ===================================================== */

.edit-profile-avatar-camera-icon {
    width: 22px;
    height: 22px;

    display: block;

    filter:
        invert(39%)
        sepia(18%)
        saturate(131%)
        hue-rotate(165deg)
        brightness(99%)
        contrast(92%);
}


/* ===================================================== */
/* 📂 FILE INPUT */
/* ===================================================== */

.edit-profile-avatar-input {
    display: none;
}


/* ===================================================== */
/* 📦 AVATAR CONTENT */
/* ===================================================== */

.edit-profile-avatar-content {
    display: flex;
    flex-direction: column;
    align-items: center;

    margin-top: 22px;
}


/* ===================================================== */
/* 🏷️ AVATAR TITLE */
/* ===================================================== */

.edit-profile-avatar-title {
    color: #F9F9F9;

    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;

    margin: 0;

    text-align: center;
}


/* ===================================================== */
/* 📝 AVATAR DESCRIPTION */
/* ===================================================== */

.edit-profile-avatar-description {
    color: #707070;

    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;

    margin-top: 8px;
    margin-bottom: 0;

    text-align: center;
}




/* ===================================================== */
/* 🗑️ REMOVE AVATAR BUTTON */
/* ===================================================== */

.edit-profile-avatar-remove-btn {

    border: none;
    background: transparent;

    color: #F86418;

    font-size: 14px;
    font-weight: 600;
    line-height: 1;

    cursor: pointer;

    padding: 8px 10px;

    -webkit-tap-highlight-color: transparent;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}


.edit-profile-avatar-remove-btn:hover {
    opacity: 0.85;
}


.edit-profile-avatar-remove-btn:active {
    transform: scale(0.96);
}



/* ===================================================== */
/* ❌ AVATAR ERROR */
/* ===================================================== */

.edit-profile-avatar-error {
    color: #FF5A5A;

    font-size: 12px;
    line-height: 1.4;

    margin: 8px 0 0;

    text-align: center;
}


/* ===================================================== */
/* 👤 SECTION */
/* ===================================================== */

.edit-profile-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


/* ===================================================== */
/* 🏷️ SECTION TITLE */
/* ===================================================== */

.edit-profile-section-title {
    color: #F9F9F9;

    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;

    margin: 0;
}


/* ===================================================== */
/* 📦 CARD */
/* ===================================================== */

.edit-profile-card {
    background: #111111;

    border: 1px solid #1B1B1B;
    border-radius: 10px;

    overflow: hidden;
}


/* ===================================================== */
/* 🧩 FIELD */
/* ===================================================== */

.edit-profile-field {
    display: flex;
    align-items: center;
    gap: 18px;

    padding: 0 16px;
}


.edit-profile-field + .edit-profile-field {
    border-top: 1px solid #1B1B1B;
}


/* ===================================================== */
/* 🎨 FIELD ICON */
/* ===================================================== */

.edit-profile-field-icon {
    width: 25px;
    height: 25px;

    flex-shrink: 0;

    opacity: 0.85;

    filter:
        invert(39%)
        sepia(18%)
        saturate(131%)
        hue-rotate(165deg)
        brightness(99%)
        contrast(92%);
}


/* ===================================================== */
/* 📦 FIELD CONTENT */
/* ===================================================== */

.edit-profile-field-content {
    flex: 1;

    display: flex;
    flex-direction: column;

    min-width: 0;
}


/* ===================================================== */
/* ✏️ INPUT WRAPPER */
/* ===================================================== */

.edit-profile-input-wrapper {
    position: relative;

    display: flex;
    align-items: flex-end;

    min-height: 56px;
}


/* ===================================================== */
/* ✏️ INPUT */
/* ===================================================== */

.edit-profile-field-input {
    width: 100%;
    height: 50px;

    border: none;
    outline: none;

    background: transparent;

    color: #F9F9F9;

    font-size: 15px;
    font-weight: 600;

    padding: 16px 0 0;
    margin: 0;

    caret-color: #F9F9F9;
}


.edit-profile-field-input::placeholder {
    color: transparent;
}


/* ===================================================== */
/* 🏷️ FLOATING LABEL */
/* ===================================================== */

.edit-profile-floating-label {
    position: absolute;
    left: 0;
    top: 50%;

    transform: translateY(-50%);

    color: #707070;

    font-size: 15px;
    font-weight: 500;

    pointer-events: none;

    transition:
        top 0.18s ease,
        transform 0.18s ease,
        font-size 0.18s ease,
        color 0.18s ease;
}


/* ===================================================== */
/* ✨ FLOAT ACTIVE */
/* ===================================================== */

.edit-profile-field-input:focus
+ .edit-profile-floating-label,

.edit-profile-field-input:not(:placeholder-shown)
+ .edit-profile-floating-label {
    top: 10px;

    transform: translateY(0);

    font-size: 13px;

    color: #707070;
}


/* ===================================================== */
/* ❌ FIELD ERROR */
/* ===================================================== */

.edit-profile-field-error {
    color: #FF5A5A;

    font-size: 12px;
    line-height: 1.4;

    margin: 0;
}


/* ===================================================== */
/* 🚨 FIELD ERROR STATE */
/* ===================================================== */

.edit-profile-field.has-error
.edit-profile-floating-label {
    color: #FF5A5A;
}


.edit-profile-field.has-error
.edit-profile-field-input {
    color: #FF5A5A;
}


/* ===================================================== */
/* 📝 BIO FIELD */
/* ===================================================== */

.edit-profile-bio-field {
    padding: 0 16px 16px;

    display: flex;
    flex-direction: column;
    gap: 16px;
}


/* ===================================================== */
/* ✏️ BIO WRAPPER */
/* ===================================================== */

.edit-profile-bio-editor-wrapper {
    position: relative;

    min-height: 70px;
}


/* ===================================================== */
/* 🏷️ BIO FLOATING PLACEHOLDER */
/* ===================================================== */

.edit-profile-bio-floating-placeholder {
    position: absolute;

    left: 0;
    top: 50%;

    transform: translateY(-50%);

    color: #707070;

    font-size: 15px;
    font-weight: 500;

    pointer-events: none;

    transition:
        top 0.18s ease,
        transform 0.18s ease,
        font-size 0.18s ease,
        color 0.18s ease;
}


/* ===================================================== */
/* ✨ BIO FLOAT ACTIVE */
/* ===================================================== */

.edit-profile-bio-editor-wrapper.is-filled
.edit-profile-bio-floating-placeholder {
    top: 10px;

    transform: translateY(0);

    font-size: 13px;
}


/* ===================================================== */
/* 📝 BIO EDITOR */
/* ===================================================== */

.edit-profile-bio-editor {
    position: relative;

    min-height: 70px;

    outline: none;
    border: none;

    background: transparent;

    color: #F9F9F9;

    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;

    white-space: pre-wrap;
    word-break: break-word;

    padding-top: 24px;

    caret-color: #F9F9F9;
}


/* ===================================================== */
/* 📦 BIO FOOTER */
/* ===================================================== */

.edit-profile-bio-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 16px;
}


/* ===================================================== */
/* 🔢 BIO COUNTER */
/* ===================================================== */

.edit-profile-bio-counter {
    color: #707070;

    font-size: 13px;
    font-weight: 500;

    flex-shrink: 0;
}


/* ===================================================== */
/* ⚠️ BIO COUNTER WARNING */
/* ===================================================== */

.edit-profile-bio-counter.is-warning {
    color: #F86418;
}


/* ===================================================== */
/* 🚨 BIO COUNTER DANGER */
/* ===================================================== */

.edit-profile-bio-counter.is-danger {
    color: #FF5A5A;
}


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

@media (max-width: 360px) {

    .edit-profile-modal-header-inner {
        padding: 0 12px;
    }

    .edit-profile-modal-body-inner {
        padding: 20px 12px 110px;
    }

    .edit-profile-modal-cancel-btn,
    .edit-profile-modal-save-btn {
        font-size: 14px;
    }

    .edit-profile-modal-title {
        font-size: 14px;
    }

    .edit-profile-field {
        gap: 14px;
        padding: 0 14px;
    }

    .edit-profile-field-icon {
        width: 23px;
        height: 23px;
    }

}