.select-profile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: none;
    z-index: 1000;
}

.select-profile-modal {
    position: fixed;
    top: 0;
    right: 0;
    width: 450px;
    height: 100%;
    background: #fff;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    padding: 30px 25px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
    z-index: 1001;
}

    .select-profile-modal.active {
        transform: translateX(0);
    }

.select-profile-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    /*border: none;
    background: none;
    cursor: pointer;
    color: #777;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;*/
    transition: background-color 0.2s;
}

    .select-profile-close-btn:hover {
        background-color: #f5f5f5;
    }

.select-profile-header {
    margin-bottom: 25px;
    padding-right: 40px;
}

    .select-profile-header h2 {
        font-size: 22px;
        font-weight: 600;
        color: #333;
        margin: 0;
    }

.select-profile-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.select-profile-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 2px solid rgba(210, 214, 219, 1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 106px;
    box-sizing: border-box;
    background: #fff;
    position: relative;
}

    .select-profile-item:hover {
        border-color: #4A6CF7;
        background-color: #4a6cf718;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(74, 108, 247, 0.7);
    }

    .select-profile-item.active {
        border-color: #4A6CF7;
        background-color: #F0F4FF;
        box-shadow: 0 4px 12px rgba(74, 108, 247, 0.15);
    }

.select-profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 20px;
    margin-bottom: 12px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: border-color 0.3s ease;
}

.select-profile-item.active .select-profile-avatar {
    border-color: #4A6CF7;
}

.select-profile-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
    color: #111;
    line-height: 1.3;
}

.select-profile-details {
    font-size: 13px;
    color: #666;
    line-height: 1.3;
}

/* Updated Edit Button Styles - Positioned top-right */
.select-profile-edit-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    /*background: #f8f9fa;
    color: #4A6CF7;
    font-size: 12px;*/
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    z-index: 2;
}

    .select-profile-edit-btn:hover {
        /*background: #4A6CF7;
        color: white;*/
        transform: scale(1.1);
        box-shadow: 0 2px 5px rgba(74, 108, 247, 0.3);
    }

    .select-profile-edit-btn .las {
        font-size: 17px;
    }

.add-new-profile-item {
    border: 2px dashed #dee2e6;
    color: #4A6CF7;
    background: #fafbff;
}

    .add-new-profile-item:hover {
        border-color: #4A6CF7;
        background-color: #F0F4FF;
        color: #4A6CF7;
    }

.select-profile-add-icon {
    position: relative;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    /*background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);*/
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
    /*border: 1px solid #7f8c8d;*/
    /*border: 2px solid var(--bs-primary);*/
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 300;
}

    .select-profile-add-icon .las {
        font-size: 36px !important;
    }

.select-profile-continue-btn {
    width: 100%;
    background: #4A6CF7;
    color: #fff;
    border: none;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(74, 108, 247, 0.3);
}

    .select-profile-continue-btn:hover:not(:disabled) {
        background: #3a5ce5;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(74, 108, 247, 0.4);
    }

    .select-profile-continue-btn:disabled {
        background: #ccc;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

/* Loading state */
.select-profile-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #666;
}

.select-profile-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4A6CF7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 500px) {
    .select-profile-modal {
        width: 100%;
        padding: 20px 15px;
    }

    .select-profile-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .select-profile-item {
        min-height: 140px;
        padding: 15px 10px;
    }

    .select-profile-avatar {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }

    .select-profile-edit-btn {
        top: 6px;
        right: 6px;
        width: 24px;
        height: 24px;
        font-size: 10px;
    }

    .closeSelectProfileModal {
        right: 23px;
        top: 18px;
    }
}

/* Scrollbar styling */
.select-profile-modal::-webkit-scrollbar {
    width: 6px;
}

.select-profile-modal::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.select-profile-modal::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

    .select-profile-modal::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }

.select-profile-photo-container {
    position: relative;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    /*background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);*/
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
    /*border: 1px solid #7f8c8d;*/
    /*border: 2px solid var(--bs-primary);*/
    cursor: pointer;
    transition: all 0.3s ease;
}

    .select-profile-photo-container:hover {
        border-color: #4a6cf7;
        transform: scale(1.05);
    }
/*
.select-avatar-img{
    height
}*/