
/* --- All Devices / Desktop View --- */
.referral-wrapper {
    position: absolute;
    top: 4px;
    right: 254px;
    
    /* Har jagah show karne ke liye force flex */
    display: flex !important;
    align-items: center;
    justify-content: center;

    margin: 0;
    z-index: 9999; /* Taaki kisi element ke peeche na chupe */
}

.referral-wrapper .referral-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-height: 44px;
    padding: 10px 18px;

    border: none;
    border-radius: 10px;

    background: #ed3262;
    color: #ffffff;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
    text-decoration: none;

    transition: all 0.2s ease;
}

.referral-wrapper .referral-btn:hover {
    background: #5720b5;
    transform: translateY(-2px);
}

.referral-wrapper .referral-btn span:first-child {
    font-size: 18px;
}

/* --- Mobile View (600px ya usse kam screens ke liye) --- */
@media (max-width: 600px) {
    .referral-wrapper {
      top: 7px;
        right: 9px;
        display: flex !important; /* Mobile par bhi visible rahega */
    }

    .referral-wrapper .referral-btn {
        min-height: 40px;
        padding: 8px 12px;
        font-size: 12px;
    }

    .referral-wrapper .referral-btn span:first-child {
        font-size: 16px;
    }
}
.profile-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.profile-modal.show {
    display: flex;
}

.profile-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(5px);
}

.profile-modal-box {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 850px;
    max-height: 90vh;

    overflow-y: auto;

    background: #fff;
    border-radius: 20px;

    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.30);

    animation: profileModalShow 0.25s ease;
}

@keyframes profileModalShow {

    from {
        opacity: 0;
        transform: translateY(25px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* Header */

.profile-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 22px 25px;

    border-bottom: 1px solid #eee;
}

.profile-modal-header h2 {
    margin: 0;

    color: #222;
    font-size: 22px;
}

.profile-modal-header h2 i {
    color: var(--accent-pink, #ed3262);
    margin-right: 7px;
}

.profile-modal-header p {
    margin: 5px 0 0;
    color: #777;
    font-size: 13px;
}

.profile-modal-close {
    width: 40px;
    height: 40px;

    border: 0;
    border-radius: 50%;

    background: #f5f5f5;
    color: #333;

    cursor: pointer;

    font-size: 18px;

    transition: 0.2s;
}

.profile-modal-close:hover {
    background: #ed3262;
    color: #fff;
}


/* Loading */

.modal-profile-loading {
    text-align: center;
    padding: 60px 20px;
    color: #ed3262;
}

.modal-profile-loading p {
    color: #555;
}


/* Error */

.modal-profile-error {
    text-align: center;
    padding: 50px 20px;
    color: #ed3262;
}

.modal-profile-error i {
    font-size: 35px;
}


/* User */

.modal-profile-user {
    display: flex;
    align-items: center;
    gap: 15px;

    margin: 20px 25px;
    padding: 18px;

    border-radius: 15px;

    background:
        linear-gradient(
            135deg,
            rgba(237, 50, 98, 0.08),
            rgba(100, 70, 200, 0.08)
        );
}

.modal-profile-avatar {
    width: 60px;
    height: 60px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #ed3262;
    color: #fff;

    font-size: 24px;
}

.modal-profile-user h3 {
    margin: 0 0 5px;
    color: #222;
}

.modal-profile-user span {
    color: #777;
    font-size: 14px;
}


/* Grid */

.modal-profile-grid {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 15px;

    padding: 0 25px 25px;
}

.modal-profile-item {

    padding: 15px;

    border: 1px solid #eee;
    border-radius: 12px;

    background: #fafafa;

    min-width: 0;
}

.modal-profile-item label {

    display: block;

    margin-bottom: 7px;

    color: #777;

    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.modal-profile-item label i {
    margin-right: 5px;
    color: #ed3262;
}

.modal-profile-item span {

    display: block;

    color: #222;

    font-size: 15px;

    overflow-wrap: anywhere;
}

.modal-full-width {
    grid-column: 1 / -1;
}

.blood-value {
    color: #ed3262 !important;
    font-weight: 700;
}

.referral-value {
    color: #6547d9 !important;
    font-family: monospace;
    font-weight: 700;
}

.points-value {
    display: inline-block !important;

    width: fit-content;

    padding: 5px 10px;

    border-radius: 20px;

    background: #fff0f4;

    color: #ed3262 !important;

    font-weight: 700;
}


/* Mobile */

@media (max-width: 600px) {

    .profile-modal {
        padding: 10px;
    }

    .profile-modal-box {
        max-height: 94vh;
        border-radius: 15px;
    }

    .modal-profile-grid {
        grid-template-columns: 1fr;
        padding: 0 15px 20px;
    }

    .modal-full-width {
        grid-column: auto;
    }

    .profile-modal-header {
        padding: 17px;
    }

    .modal-profile-user {
        margin: 15px;
    }

}
.profile-modal-actions {
    display: flex;
    gap: 12px;
    padding: 0 25px 25px;
}

.profile-btn {
    flex: 1;
    border: 0;
    border-radius: 10px;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: 0.2s;
}

.profile-btn-edit {
    background: #6547d9;
    color: #fff;
}

.profile-btn-edit:hover {
    background: #5036b5;
}

.profile-btn-delete {
    background: #fff0f0;
    color: #dc3545;
    border: 1px solid #dc3545;
}

.profile-btn-delete:hover {
    background: #dc3545;
    color: #fff;
}

@media (max-width: 600px) {

    .profile-modal-actions {
        flex-direction: column;
        padding: 0 15px 20px;
    }

}
