.user-profile-header {
    background-color: var(--bgsection);
    padding: 15px;
    border-radius: 8px;
}

.user-location i {
    color: var(--primary-alt);
}

.user-location {
    color:#888;
}

.user-main .container {

}

.userbuttons-topright button {
    background-color: #414244;
    border: var(--border-color) 1px solid;
    color: #e4e6eb;
    height: 41px;
    width: 41px;
    border-radius: 50%;
    text-align: center;
    line-height: 37px;
}
.user-garage-car {
    aspect-ratio: 1;
    background-color: var(--primary-alt);
    border-radius:5px;
}
.profile-avatar-wrap {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    background-color: #232323;
    position: relative;
    border: 1px solid #333;
    border-radius: 5px;
    display: flex;
}

/* EDIT PROFILE */
a.editprofile-successlink {
    font-weight: 600;
    font-size: 13px;
    text-decoration: underline;
    color: #fff;
    display: inline-block;
    margin-bottom: 5px;
}
.user-profile-avatar {
    width: 60px;
}
.user-profile-avatar-edit {
    width: 120px;
    display: block;
    margin: 0 auto;
}

.profile-avatar {
    transition: opacity 0.25s ease-in;
    opacity: 1;
}

.profile-avatar.is-fading {
    opacity: 0;
}

.fade-in {
    animation: fadeInUp 0.5s ease both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

button#regenerate-avatar {
    position: absolute;
    right: -10px;
    bottom: -5px;
    color: #fff;
    border: 0;
    width: 26px;
    height: 26px;
    justify-content: center;
    display: flex;
    padding-bottom: 1px;
    align-items: center;
    border-radius: 100px;
    background-color: var(--primary-alt);
        transition: transform 0.4s ease;
    transform: rotate(var(--spin, 0deg));
}
button#regenerate-avatar:hover {
    background-color:var(--primary);
}


/* ======================================================
PROFILE INLINE EDIT – AUTHOR PAGE
====================================================== */

.user-profile-avatar-wrap {
    position: relative;
    width: 60px;
}

.user-profile-inline-edit-btn {
    position: absolute;
    right: -5px;
    bottom: -5px;
    width: 18px;
    padding-top: 2px;
    height: 18px;
    border: 0;
    border-radius: 50%;
    font-size: 7.5px;
    color: #fff;
    background: var(--primary);
}

.user-profile-inline-text-btn {
    border: 0;
    background: transparent;
    color: var(--primary-muted);
    font-size: 12px;
    padding: 0 4px;
    text-decoration: underline;
}

.user-profile-inline-text-link {
    border: 0;
    background: transparent;
    padding: 0;
    text-decoration: none;
}

.sc-profile-edit-save-toast {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: #2f9d42;
    color: #fff;
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.2s ease;
}

.sc-profile-edit-save-toast.is-visible {
    opacity: 1;
}

.sc-profile-edit-modal {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
}

.sc-profile-edit-modal.is-open {
    display: block;
}

.sc-profile-edit-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

.sc-profile-edit-main {
    position: relative;
    width: calc(100% - 24px);
    max-width: 400px;
    margin: 12vh auto 0;
    border-radius: 8px;
    border: 1px solid #404142;
    background: #242527;
    padding: 16px;
}

.sc-profile-edit-close-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    opacity: 0.8;
}

.sc-profile-edit-note {
    color: #a7a7a7;
    font-size: 12px;
    margin-bottom: 10px;
}

.sc-profile-edit-avatar-preview-wrap {
    position: relative;
    display: inline-block;
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
}

.sc-profile-edit-avatar-preview {
    width: 96px;
    height: 96px;
    border-radius: 6px;
    border: 0;
    background: transparent;
    display: block;
}

.sc-profile-edit-avatar-refresh-btn {
    position: absolute;
    right: -9px;
    bottom: -9px;
    color: #fff;
    border: 0;
    width: 26px;
    height: 26px;
    justify-content: center;
    display: flex;
    align-items: center;
    border-radius: 100px;
    background-color: var(--primary-alt);
    font-size: 12px;
}

.sc-profile-edit-avatar-refresh-btn:hover {
    background-color: var(--primary);
}

.sc-profile-edit-social-grid {
    display: grid;
    gap: 8px;
}

/* ======================================================
PROFILE AVATAR FADE TRANSITION
====================================================== */

.sc-profile-avatar-fade {
    transition: opacity 0.2s ease;
}

.sc-profile-avatar-fade.is-fading {
    opacity: 0;
}


/* MEDIA QUERIES */

@media (min-width: 992px) {
    .user-main .container {
        max-width: 800px;
    }
}




/* ======================================================
ACCOUNT SETTINGS – PASSWORD VALIDATION (FINAL)
====================================================== */

.account-pass-wrap {
    position: relative;
}

/* green check icon */
.account-pass-wrap .input-check {
    position: absolute;
    right: 42px;
    top: 50%;
    transform: translateY(-50%);
    color: #28a745;
    font-size: 14px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.account-pass-wrap.valid .input-check {
    opacity: 1;
}

/* generic hint (HIDDEN STATE) */
.account-pass-wrap .password-hint {
    display: block;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    transition: max-height 0.25s ease,
                opacity 0.25s ease,
                margin-top 0.25s ease;
    font-size: 12px;
}

/* colors */
.account-pass-wrap .password-hint-error {
    color: #dc3545;
}

.account-pass-wrap .password-hint-warning {
    color: #dc3545;
}

/* SHOW RULES — FIELD-SPECIFIC */

.account-pass-wrap.invalid #scx-current-pass-error {
    max-height: 40px;
    opacity: 1;
    margin-top: 4px;
}

.account-pass-wrap.invalid #sc-delete-pass-error {
    max-height: 40px;
    opacity: 1;
    margin-top: 4px;
}

.account-pass-wrap.short #scx-new-pass-hint {
    max-height: 40px;
    opacity: 1;
    margin-top: 4px;
}

.account-pass-wrap.mismatch #scx-confirm-pass-hint {
    max-height: 40px;
    opacity: 1;
    margin-top: 4px;
}

/* show new password check */
.account-pass-wrap.valid-new #scx-new-pass-check {
    opacity: 1;
}

/* show confirm password check */
.account-pass-wrap.valid-confirm #scx-confirm-pass-check {
    opacity: 1;
}

/* GREEN BORDERS FOR VALID STATES */

.account-pass-wrap.valid-new input,
.account-pass-wrap.valid-confirm input {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.1rem rgba(40, 167, 69, 0.25);
}

/* optional: keep red border priority on errors */
.account-pass-wrap.invalid input,
.account-pass-wrap.mismatch input {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.1rem rgba(220, 53, 69, 0.25);
}

/* optional: yellow border for short password */
.account-pass-wrap.short input {
    border-color: #ffc107 !important;
    box-shadow: 0 0 0 0.1rem rgba(255, 193, 7, 0.25);
}
