/* ==========================================
   PROFILE MODAL POLISH
========================================== */

#profileModal .modal-dialog {
    max-width: 540px;
}

#profileModal .modal-content {
    border: none;
    border-radius: 24px;
    overflow: hidden;
    padding: 1.5rem;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

#profileModal .modal-header {
    border-bottom: none;
    padding: 0 0 1rem;
}

#profileModal .modal-title {
    color: #0b6f8f;
    font-weight: 800;
}

#profileModal .btn-close {
    box-shadow: none;
}

/* ==========================================
   AVATAR PREVIEW FIX
========================================== */

#profileModal .profile-avatar-preview,
#profileModal .profile-modal-avatar,
#profileModal #currentAvatar,
#profileModal #profileAvatarPreview,
#profileModal #avatarPreview {
    width: 96px !important;
    height: 96px !important;
    max-width: 96px !important;
    max-height: 96px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 auto 0.75rem !important;
    padding: 4px;
    background: #ffffff;
    border: 3px solid #ffffff;
    box-shadow: 0 12px 30px rgba(11, 111, 143, 0.18);
}

#profileModal img {
    max-width: 100%;
}

/* ==========================================
   TEXT
========================================== */

#profileModal label {
    color: #2f3a4a;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

#profileModal .profile-section-title,
#profileModal h3,
#profileModal h4 {
    color: #0b6f8f;
    font-weight: 800;
}

#profileModal p,
#profileModal small {
    color: #5f6b7a;
}

/* ==========================================
   FORM CONTROLS
========================================== */

#profileModal .form-control,
#profileModal .form-select {
    border-radius: 14px;
    border: 1px solid rgba(11, 111, 143, 0.18);
    padding: 0.85rem 1rem;
}

#profileModal .form-control:focus,
#profileModal .form-select:focus {
    border-color: #f45b69;
    box-shadow: 0 0 0 0.18rem rgba(244, 91, 105, 0.18);
}

/* ==========================================
   EMAIL CHECKBOX
========================================== */

#profileModal .form-check {
    margin: 1rem 0;
}

#profileModal .form-check-input {
    cursor: pointer;
}

#profileModal .form-check-label {
    color: #5f6b7a;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.45;
}

/* ==========================================
   PASSWORD FIELDS
========================================== */

.password-wrapper {
    position: relative;
}

.password-wrapper .form-control {
    padding-right: 3rem;
}

.profile-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.9rem;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    width: auto;
    height: auto;
    padding: 0;
}

.profile-password-toggle:hover {
    color: #0b6f8f;
}

/* ==========================================
   SAVE BUTTON
========================================== */

#profileModal .btn-primary,
#profileModal .save-profile-btn,
#profileModal button[type="submit"] {
    width: 100%;
    border: none !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, #e94b5a, #ff6f81) !important;
    color: #ffffff !important;
    font-weight: 800;
    padding: 0.95rem 1.5rem;
    box-shadow: 0 14px 30px rgba(244, 91, 105, 0.28);
    transition: all 0.25s ease;
}

#profileModal .btn-primary:hover,
#profileModal .save-profile-btn:hover,
#profileModal button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(244, 91, 105, 0.34);
}

/* ==========================================
   MOBILE
========================================== */

@media (max-width: 576px) {
    #profileModal .modal-dialog {
        margin: 0.75rem;
    }

    #profileModal .modal-content {
        padding: 1.2rem;
        border-radius: 20px;
    }

    #profileModal .profile-avatar-preview,
    #profileModal .profile-modal-avatar,
    #profileModal #currentAvatar,
    #profileModal #profileAvatarPreview,
    #profileModal #avatarPreview {
        width: 84px !important;
        height: 84px !important;
        max-width: 84px !important;
        max-height: 84px !important;
    }
}

/* =====================================================
   LITTLE HERO PROFILE AVATAR CAROUSEL
===================================================== */

.profile-avatar-carousel-shell {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.profile-avatar-carousel {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 4px 12px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
}

.profile-avatar-card {
    flex: 0 0 120px;
    padding: 12px;
    border: 2px solid rgba(189, 54, 64, .15);
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .08);
    transition: .25s;
}

.profile-avatar-card:hover {
    transform: translateY(-3px);
    border-color: #BD3640;
}

.profile-avatar-card.active {
    border-color: #BD3640;
    box-shadow: 0 18px 34px rgba(189, 54, 64, .22);
}

.profile-avatar-card img {
    width: 80px;
    height: 80px;
    display: block;
    margin: auto;
    object-fit: cover;
    border-radius: 50%;
}

.profile-avatar-arrow {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;

    background: linear-gradient(180deg,
            #d94a52 0%,
            #BD3640 100%);

    box-shadow: 0 8px 18px rgba(189, 54, 64, .25);
}

.profile-avatar-arrow:hover {
    transform: scale(1.05);
}

.profile-avatar-carousel::-webkit-scrollbar {
    height: 8px;
}

.profile-avatar-carousel::-webkit-scrollbar-thumb {
    background: #BD3640;
    border-radius: 999px;
}